RISC-V: Multiple jstz benchmarks script
What
Adds the script src/riscv/scripts/benchmark.sh which runs jstz on riscv and native, for two specified commits.
Usage: benchmark.sh -t <transactions> -i <iterations> -n <native_iterations> -b <base_commit> -c <change_commit>
-
-i <iterations>specifies the number of jstz runs when the RISCV interpreter is used. -
-n <native_iterations>specifies the number of jstz runs in natively compiled code. -
-b <base_commit>The commit for the master branch or the 'base'. -
-c <change_commit>The commit for the tested change.
To view the full results, run logs are saved in files named <BASE/CHANGE>_<NATIVE/RISCV>_<commit>.run.
Tip: Commits can also be branch names!
Why
Easier to get benchmark timings, on both the local machine and the remote machine.
How
Adds the script src/riscv/scripts/benchmark.sh with appropiate options.
Manually Testing
make -C src/riscv all
./scripts -t 1 -i 3 -b branch_A -c branch_B
Where branch_A & branch_B are branches on top of this change.
Benchmarking
Performance not impacted
master |
This MR | Improvement | |
|---|---|---|---|
| $MyMachine | X.XXX TPS (1/XXX native) | X.XXX TPS (1/XXX native) | XX.XX% |
| Benchmark Machine | Y.YYY TPS (1/YYY native) | Y.YYY TPS (1/YYY native) | YY.YY% |
Tasks for the Author
-
Link all Linear issues related to this MR using magic words (e.g. part of, relates to, closes). -
Eliminate dead code and other spurious artefacts introduced in your changes. -
Document new public functions, methods and types. -
Make sure the documentation for updated functions, methods, and types is correct. -
Add tests for bugs that have been fixed. -
Put in reasonable effort to ensure that CI will pass. -
Benchmark performance and populate the table above if needed. -
Write commit messages to reflect the changes they're about. -
Self-review your changes to ensure they are high-quality. -
Complete all of the above before assigning this MR to reviewers.
Edited by Felix Puscasu