-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
revive: Rework the instruction benchmark #7721
Conversation
/cmd bench --runtime dev --pallet pallet_revive --clean |
Command "bench --runtime dev --pallet pallet_revive --clean" has started 🚀 See logs here |
…t_revive --clean'
Command "bench --runtime dev --pallet pallet_revive --clean" has finished ✅ See logs here Subweight results:
Command output:✅ Successful benchmarks of runtimes/pallets: |
Co-authored-by: xermicus <[email protected]>
Co-authored-by: PG Herveou <[email protected]>
All GitHub workflows were cancelled due to failure one of the required jobs. |
Fixes #6157 This fixes the last remaining benchmark that was not correct since it was too low level to be written in Rust. Instead, we opted. This PR changes the benchmark that determines the scaling from `ref_time` to PolkaVM `Gas` by benchmarking the absolute worst case of an instruction: One that causes two cache misses by touching two cache lines. The Contract itself is designed to be as simple as possible. It does random unaligned reads in a loop until the `r` (repetition) number is reached. The randomness is fully generated by the host and written to the guests memory before the benchmark is run. This allows the benchmark to determine the influence of one loop iteration via linear regression. --------- Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: xermicus <[email protected]> Co-authored-by: PG Herveou <[email protected]>
Fixes #6157
This fixes the last remaining benchmark that was not correct since it was too low level to be written in Rust. Instead, we opted.
This PR changes the benchmark that determines the scaling from
ref_time
to PolkaVMGas
by benchmarking the absolute worst case of an instruction: One that causes two cache misses by touching two cache lines.The Contract itself is designed to be as simple as possible. It does random unaligned reads in a loop until the
r
(repetition) number is reached. The randomness is fully generated by the host and written to the guests memory before the benchmark is run. This allows the benchmark to determine the influence of one loop iteration via linear regression.