Skip to content

Fix TestVm::Init test to reflect true time to create a warmed thread#547

Open
leonm1 wants to merge 2 commits into
proxy-wasm:mainfrom
leonm1:bench_init
Open

Fix TestVm::Init test to reflect true time to create a warmed thread#547
leonm1 wants to merge 2 commits into
proxy-wasm:mainfrom
leonm1:bench_init

Conversation

@leonm1
Copy link
Copy Markdown
Contributor

@leonm1 leonm1 commented May 29, 2026

Includes a microbenchmark to demonstrate the time it takes to create and warm a new WasmVm instance for each runtime, which was used to find the thresholds for the regression test.

I ran the regression test with many --runs_per_test to fine-tune the limits to avoid flakes.

Benchmark results with --dynamic_mode=off -c opt

Run on (128 X 2450 MHz CPU s)
-----------------------------------------------------------------
Benchmark                       Time             CPU   Iterations
-----------------------------------------------------------------
BM_V8WarmVmStart           535905 ns       535830 ns         1303
BM_WasmtimeWarmVmStart        372 ns          372 ns      1880324
BM_WasmEdgeWarmVmStart        235 ns          235 ns      2978325
BM_WamrWarmVmStart            181 ns          181 ns      3868665

In fastbuild:

Run on (128 X 2450 MHz CPU s)
***WARNING*** Library was built as DEBUG. Timings may be affected.
----------------------------------------------------------------- 
Benchmark                       Time             CPU   Iterations 
----------------------------------------------------------------- 
BM_V8WarmVmStart         13467098 ns     13464209 ns           51 
BM_WasmtimeWarmVmStart       6539 ns         6538 ns       106450 
BM_WasmEdgeWarmVmStart       1524 ns         1523 ns       457547 
BM_WamrWarmVmStart            859 ns          859 ns       801159

leonm1 added 2 commits May 28, 2026 21:53
Signed-off-by: Matt Leon <mattleon@google.com>
Signed-off-by: Matt Leon <mattleon@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant