Files
photocraft/crates/testkit/Cargo.toml
T
xsvm 8fe2c74f58 perf(testkit): sample RSS from /proc/self/statm, not smaps, on Linux (#5399)
memory-stats reads /proc/self/smaps by default on Linux: every sample formats and parses one
block per mapping while holding the mmap lock. The benches' RssSampler polls it every 2 ms, so
on a profile of bevel_bench --size 4000x3000 the rss-sampler thread was ~22% of all samples
(smaps_account 14.7%, smaps_pte_entry 6.3%), contending with the measured threads.

Enable the crate's always_use_statm feature: one short read of the kernel's RSS counters, the
same number VmRSS reports. The measured code is unchanged; only the harness overhead goes.
2026-10-16 17:00:43 -06:00

21 lines
706 B
TOML

[package]
name = "photocraft-testkit"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
photocraft-geom = { workspace = true }
photocraft-color = { workspace = true }
photocraft-raster = { workspace = true }
serde_json = { workspace = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# In-process resident memory for the benchmarks (`perf`; MIT OR Apache-2.0). `always_use_statm`:
# on Linux read /proc/self/statm, not /proc/self/smaps, which walks every mapping under the mmap
# lock and made the 2 ms sampler thread a fifth of a large bench's CPU time.
memory-stats = { version = "1.2", features = ["always_use_statm"] }