feat(rpc): expose and auto-size replay cache capacity (#5781)

* feat(metrics): expose replay cache pressure

Co-Authored-By: heihutu <heihutu@gmail.com>

* feat(rpc): auto-size replay cache capacity

Co-Authored-By: heihutu <heihutu@gmail.com>

* feat(cache): split runtime memory feature

Co-Authored-By: heihutu <heihutu@gmail.com>

---------

Co-authored-by: heihutu <heihutu@gmail.com>
This commit is contained in:
houseme
2026-08-07 08:52:02 +08:00
committed by GitHub
parent 77f2b948c2
commit 83cdea1f18
12 changed files with 795 additions and 191 deletions
+22 -10
View File
@@ -28,21 +28,33 @@ categories = ["web-programming", "development-tools"]
doctest = false
[features]
default = []
hotpath = ["hotpath/hotpath", "hotpath/tokio"]
default = ["cache"]
runtime-memory = ["dep:sysinfo"]
cache = [
"runtime-memory",
"dep:bytes",
"dep:metrics",
"dep:moka",
"dep:starshard",
"dep:thiserror",
"dep:tokio",
"dep:tracing",
"sysinfo/multithread",
]
hotpath = ["cache", "hotpath/hotpath", "hotpath/tokio"]
hotpath-alloc = ["hotpath", "hotpath/hotpath-alloc"]
hotpath-cpu = ["hotpath", "hotpath/hotpath-cpu"]
[dependencies]
hotpath.workspace = true
bytes = { workspace = true, features = ["serde"] }
metrics = { workspace = true }
moka = { workspace = true, features = ["future"] }
starshard = { workspace = true, features = ["rayon", "async", "serde"] }
sysinfo = { workspace = true, features = ["multithread"] }
thiserror.workspace = true
tokio = { workspace = true, features = ["sync", "time", "fs", "rt-multi-thread"] }
tracing.workspace = true
bytes = { workspace = true, optional = true, features = ["serde"] }
metrics = { workspace = true, optional = true }
moka = { workspace = true, optional = true, features = ["future"] }
starshard = { workspace = true, optional = true, features = ["rayon", "async", "serde"] }
sysinfo = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }
tokio = { workspace = true, optional = true, features = ["sync", "time", "fs", "rt-multi-thread"] }
tracing = { workspace = true, optional = true }
[dev-dependencies]
criterion = { workspace = true, features = ["html_reports"] }