From 9e2f820257091a5e16ea0ab24c4c71d517c0c8b5 Mon Sep 17 00:00:00 2001 From: ApsisRS contributors Date: Wed, 30 Sep 2026 18:23:37 +0800 Subject: [PATCH] docs: register the two scale benchmarks and correct the stale note bench_scale and bench_parallel were runnable but documented nowhere, so the directory listing did not say they existed. The file header of bench_scale also still claimed the harness warms up, which it stopped doing when the cold cost was given its own column. --- README.md | 6 ++++++ crates/apsis-rs/examples/bench_scale.rs | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b34f625..7067d23 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,12 @@ cargo run -p apsis-rs --features sim --example integrate_sim # 热点路径基准(release 下运行) cargo run --release -p apsis-rs --features full --example bench + +# 规模扫描:输入规模递增,观察每单位工作量的增长趋势 +cargo run --release -p apsis-rs --features full --example bench_scale + +# 并行扫描:同一批工作量在 1/2/4/8/16 线程下的加速比与效率 +cargo run --release -p apsis-rs --features full --example bench_parallel ``` ## 许可 diff --git a/crates/apsis-rs/examples/bench_scale.rs b/crates/apsis-rs/examples/bench_scale.rs index 3448ff7..d07543b 100644 --- a/crates/apsis-rs/examples/bench_scale.rs +++ b/crates/apsis-rs/examples/bench_scale.rs @@ -13,9 +13,11 @@ //! satellite, building the inter-satellite topology and routing through it, //! and planning a task set with precedence. //! -//! Everything is measured in release mode with a fixed iteration count, and -//! the harness warms up before timing so that lazy initialisation is not -//! charged to the first call. +//! Everything is measured in release mode. There is deliberately no warm-up: +//! the first call pays for whatever the path allocates or caches on first +//! use, and a caller waits for that too, so the cold cost is reported on its +//! own column beside the steady state rather than being hidden behind a +//! discarded run. //! //! Usage: //!