Skip to content

Commit 144c936

Browse files
feat(bench): each case keeps its memory peak in MB beside its time
1 parent 4650ae5 commit 144c936

9 files changed

Lines changed: 5316 additions & 5249 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ deno lint js/
6161

6262
### Bench
6363

64-
`cargo run -p bench --profile cli` runs every case of `vm.json` on the `cargo wasm-cli` build, and stops when that build is older than `src/`. It counts the WebAssembly instructions each case executes and prices each at 0.82 ns, the 822756 gas that `wasm_regular_op_cost` sets in `core/parameters/res/runtime_configs/parameters.yaml` of nearcore, at the 1 ms per Tgas its gas estimator budgets, so `bench/.snapshot` keeps reference seconds that come out the same on every machine.
64+
`cargo run -p bench --profile cli` runs every case of `vm.json` on the `cargo wasm-cli` build, and stops when that build is older than `src/`. It counts the WebAssembly instructions each case executes and prices each at 0.82 ns, the 822756 gas that `wasm_regular_op_cost` sets in `core/parameters/res/runtime_configs/parameters.yaml` of nearcore, at the 1 ms per Tgas its gas estimator budgets, so `bench/.snapshot` keeps reference seconds that come out the same on every machine. Each case keeps them beside its memory peak in MB, by the model the memory limit counts, as `[seconds, MB]`.
6565

6666
The Bench job fails a pull request when
6767

6868
- the snapshot was taken with another Rust,
6969
- a case is missing from it, or an entry has no case,
70-
- the geometric mean moves past its threshold, slower or faster,
71-
- a single case moves past its own threshold.
70+
- the geometric mean of time or memory moves past its threshold, either way,
71+
- a single case moves past its own threshold in either.
7272

7373
Every run prints how the cases already in the snapshot moved, even when another rule fails. `--update` reports the change and takes the snapshot again, and a faster engine takes it too, so the next change is measured from where the code stands.
7474

0 commit comments

Comments
 (0)