Skip to content
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

feat(weights-diff): Add memory weights #2995

Merged
merged 2 commits into from
Jul 28, 2023
Merged

feat(weights-diff): Add memory weights #2995

merged 2 commits into from
Jul 28, 2023

Conversation

ukint-vs
Copy link
Member

Add comparison for memory weights.

cargo run --package gear-weight-diff --release -- diff ./weight-dumps/master.json  ./weight-dumps/vs-refine-runtime-interface.json "gear" "memory" --display-units

For example:

Comparison table for Gear runtime

name master vs/refine-runtime-interface diff
lazy_pages_signal_read 28.1 µs 28.1 µs -0.17%
lazy_pages_signal_write 33.9 µs 34.9 µs -2.75%
lazy_pages_signal_write_after_read 9.1 µs 9.7 µs -5.54%
lazy_pages_host_func_read 29.1 µs 29.0 µs +0.15%
lazy_pages_host_func_write 32.3 µs 34.8 µs -7.16%
lazy_pages_host_func_write_after_read 7.6 µs 10.4 µs -26.92%
load_page_data 8.9 µs 9.1 µs -1.87%
upload_page_data 103.9 µs 103.9 µs -0.03%
static_page 100 ps 100 ps +0.00%
mem_grow 299.7 ns 298.0 ns +0.58%
parachain_read_heuristic 0 ps 0 ps N/A

@reviewer-or-team

@ukint-vs ukint-vs added A0-pleasereview PR is ready to be reviewed by the team C1-feature Feature request D5-tooling Helper tools and utilities labels Jul 27, 2023
@ukint-vs ukint-vs self-assigned this Jul 27, 2023
@StackOverflowExcept1on
Copy link
Member

We have a diff script that prints all types of weights

cargo run --package gear-weight-diff --release -- diff "$dump_path1" "$dump_path2" "$runtime" "instruction" $flag
cargo run --package gear-weight-diff --release -- diff "$dump_path1" "$dump_path2" "$runtime" "host-fn" $flag

You can also add a line at the end

+  cargo run --package gear-weight-diff --release -- diff "$dump_path1" "$dump_path2" "$runtime" "memory" $flag 

@ukint-vs ukint-vs added A2-mergeoncegreen PR is ready to merge after CI passes and removed A0-pleasereview PR is ready to be reviewed by the team labels Jul 28, 2023
@ukint-vs ukint-vs merged commit 51d77aa into master Jul 28, 2023
19 checks passed
@ukint-vs ukint-vs deleted the vs/weights-diff-mem branch July 28, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A2-mergeoncegreen PR is ready to merge after CI passes C1-feature Feature request D5-tooling Helper tools and utilities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants