treewide: set up Hotpath for benchmarking individual allocations

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I0351e5753996e6d0391fc9e2f329878a6a6a6964
This commit is contained in:
raf 2025-11-17 17:39:21 +03:00
commit 2a6fe2a3f1
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
8 changed files with 1075 additions and 3 deletions

View file

@ -12,12 +12,19 @@ name = "microfetch"
path = "src/main.rs"
[dependencies]
libc = "0.2.175"
nix = { default-features = false, features = [ "fs", "hostname", "feature" ], version = "0.30.1" }
hotpath = { optional = true, version = "0.6" }
libc = "0.2.175"
nix = { default-features = false, features = [ "fs", "hostname", "feature" ], version = "0.30.1" }
[dev-dependencies]
criterion = "0.7"
[features]
hotpath = [ "dep:hotpath", "hotpath/hotpath" ]
hotpath-alloc-bytes-total = [ "hotpath/hotpath-alloc-bytes-total" ]
hotpath-alloc-count-total = [ "hotpath/hotpath-alloc-count-total" ]
hotpath-off = [ "hotpath/hotpath-off" ]
[[bench]]
harness = false
name = "benchmark"