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

Gas profiling of EntryPoints from transaction generator #11114

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

igor-aptos
Copy link
Contributor

Description

Test Plan

@igor-aptos
Copy link
Contributor Author

igor-aptos commented Nov 29, 2023

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @igor-aptos and the rest of your teammates on Graphite Graphite

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.0%. Comparing base (f991f0d) to head (2a4c159).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main   #11114     +/-   ##
=========================================
- Coverage    59.1%    59.0%   -0.2%     
=========================================
  Files         827      828      +1     
  Lines      201015   201584    +569     
=========================================
+ Hits       118830   118943    +113     
- Misses      82185    82641    +456     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from 73156c5 to ef4659d Compare November 29, 2023 18:23
@igor-aptos igor-aptos changed the base branch from main to igor/gas_schedule_update November 29, 2023 22:22
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from ef4659d to 7e72df2 Compare November 29, 2023 22:22
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from 7e72df2 to 9ce0fa8 Compare November 29, 2023 23:49
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 2 times, most recently from 8d36b95 to f0df36d Compare November 30, 2023 21:59
@igor-aptos igor-aptos changed the base branch from igor/gas_schedule_update to main December 1, 2023 18:50
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 3 times, most recently from 44293e5 to cd83f39 Compare December 6, 2023 21:04
// Confirm the index is not out of bounds.
assert!(index < vector::length(&palette_.vec), error::invalid_argument(E_INDEX_OUT_OF_BOUNDS));

// Write the pixel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove?

let all_palettes = borrow_global<AllPalettes>(palette_addr);
let palette_addr = vector::borrow(&all_palettes.all, palette_index);

let palette_ = borrow_global_mut<Palette>(*palette_addr);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the "_" suffix?

Comment on lines 39 to 40
let execution = aggregated.ops.iter().map(|(_, _, v)| cast(*v)).sum::<f64>();
let read = aggregated.storage_reads.iter().map(|(_, _, v)| cast(*v)).sum::<f64>();
let write = aggregated.storage_writes.iter().map(|(_, _, v)| cast(*v)).sum::<f64>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: nicer to have these as methods on the AggregatedExecutionGasEvents

let profile_gas = match std::env::var("PROFILE_GAS") {
Ok(s) => {
let s = s.to_lowercase();
s != "0" && s != "false" && s != "no"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's counter intuitive to be able to enable a feature by setting a env var "nah". lol (I think we should match positive workds like "1", "yes", "true")

@igor-aptos igor-aptos changed the base branch from main to igor/add_benchmark_workloads December 7, 2023 20:03
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from cd83f39 to 79b477b Compare December 7, 2023 20:03
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 2 times, most recently from 42cfb51 to e63b2c0 Compare December 7, 2023 23:42
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 2 times, most recently from 42da298 to 3e902cb Compare December 8, 2023 16:56
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from b16d0ee to fc4583b Compare December 14, 2023 18:53
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added Stale and removed Stale labels Jan 29, 2024
Copy link
Contributor

github-actions bot commented Apr 5, 2024

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Apr 5, 2024
@igor-aptos igor-aptos removed the Stale label Apr 5, 2024
let txn = self.create_transaction_payload(account, payload);
let (output, gas_log) = self
.executor
.execute_transaction_with_gas_profiler(txn)
.unwrap();
// println!("output: {:?}", output);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm

Copy link
Contributor

github-actions bot commented Jun 8, 2024

This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.

@github-actions github-actions bot added the Stale label Jun 8, 2024
@github-actions github-actions bot removed the Stale label Jun 16, 2024
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from fc4583b to 0c7aef1 Compare July 2, 2024 17:53
Copy link

trunk-io bot commented Jul 2, 2024

⏱️ 33h 37m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-unit-tests 9h 41m 🟩🟩🟩🟩🟩 (+15 more)
windows-build 8h 22m 🟩🟩🟩🟩🟩 (+23 more)
rust-move-unit-coverage 3h 18m 🟩🟩🟩🟥 (+9 more)
rust-images / rust-all 2h 54m 🟩🟩🟩🟩🟩 (+12 more)
rust-move-unit-coverage 2h 50m 🟩🟩🟩🟩🟩 (+4 more)
rust-lints 1h 47m 🟩🟩🟩🟥🟥 (+13 more)
run-tests-main-branch 1h 20m 🟩🟩🟩🟩🟩 (+13 more)
check 1h 11m 🟩🟩🟩🟩🟩 (+17 more)
check-dynamic-deps 53m 🟩🟩🟩🟩🟩 (+21 more)
general-lints 44m 🟩🟩🟩🟩🟩 (+13 more)
docs-lint 12m 🟩🟩🟩🟩 (+13 more)
semgrep/ci 11m 🟩🟩🟩🟩🟩 (+21 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+13 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+16 more)
file_change_determinator 3m 🟩🟩🟩🟩🟩 (+11 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 53s 🟩🟩🟩🟩 (+18 more)
permission-check 49s 🟩🟩🟩🟩 (+18 more)
permission-check 39s 🟩🟩🟩🟩🟩 (+15 more)
determine-docker-build-metadata 39s 🟩🟩🟩🟩🟩 (+11 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
run-tests-main-branch 6m 4m +44%

settingsfeedbackdocs ⋅ learn more about trunk.io

2 similar comments
Copy link

trunk-io bot commented Jul 2, 2024

⏱️ 33h 37m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-unit-tests 9h 41m 🟩🟩🟩🟩🟩 (+15 more)
windows-build 8h 22m 🟩🟩🟩🟩🟩 (+23 more)
rust-move-unit-coverage 3h 18m 🟩🟩🟩🟥 (+9 more)
rust-images / rust-all 2h 54m 🟩🟩🟩🟩🟩 (+12 more)
rust-move-unit-coverage 2h 50m 🟩🟩🟩🟩🟩 (+4 more)
rust-lints 1h 47m 🟩🟩🟩🟥🟥 (+13 more)
run-tests-main-branch 1h 20m 🟩🟩🟩🟩🟩 (+13 more)
check 1h 11m 🟩🟩🟩🟩🟩 (+17 more)
check-dynamic-deps 53m 🟩🟩🟩🟩🟩 (+21 more)
general-lints 44m 🟩🟩🟩🟩🟩 (+13 more)
docs-lint 12m 🟩🟩🟩🟩 (+13 more)
semgrep/ci 11m 🟩🟩🟩🟩🟩 (+21 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+13 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+16 more)
file_change_determinator 3m 🟩🟩🟩🟩🟩 (+11 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 53s 🟩🟩🟩🟩 (+18 more)
permission-check 49s 🟩🟩🟩🟩 (+18 more)
permission-check 39s 🟩🟩🟩🟩🟩 (+15 more)
determine-docker-build-metadata 39s 🟩🟩🟩🟩🟩 (+11 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
run-tests-main-branch 6m 4m +44%

settingsfeedbackdocs ⋅ learn more about trunk.io

Copy link

trunk-io bot commented Jul 2, 2024

⏱️ 33h 37m total CI duration on this PR
Job Cumulative Duration Recent Runs
rust-unit-tests 9h 41m 🟩🟩🟩🟩🟩 (+15 more)
windows-build 8h 22m 🟩🟩🟩🟩🟩 (+23 more)
rust-move-unit-coverage 3h 18m 🟩🟩🟩🟥 (+9 more)
rust-images / rust-all 2h 54m 🟩🟩🟩🟩🟩 (+12 more)
rust-move-unit-coverage 2h 50m 🟩🟩🟩🟩🟩 (+4 more)
rust-lints 1h 47m 🟩🟩🟩🟥🟥 (+13 more)
run-tests-main-branch 1h 20m 🟩🟩🟩🟩🟩 (+13 more)
check 1h 11m 🟩🟩🟩🟩🟩 (+17 more)
check-dynamic-deps 53m 🟩🟩🟩🟩🟩 (+21 more)
general-lints 44m 🟩🟩🟩🟩🟩 (+13 more)
docs-lint 12m 🟩🟩🟩🟩 (+13 more)
semgrep/ci 11m 🟩🟩🟩🟩🟩 (+21 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+13 more)
file_change_determinator 4m 🟩🟩🟩🟩🟩 (+16 more)
file_change_determinator 3m 🟩🟩🟩🟩🟩 (+11 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 1m 🟩🟩🟩🟩🟩 (+21 more)
permission-check 53s 🟩🟩🟩🟩 (+18 more)
permission-check 49s 🟩🟩🟩🟩 (+18 more)
permission-check 39s 🟩🟩🟩🟩🟩 (+15 more)
determine-docker-build-metadata 39s 🟩🟩🟩🟩🟩 (+11 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
run-tests-main-branch 6m 4m +44%

settingsfeedbackdocs ⋅ learn more about trunk.io

@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 2 times, most recently from 0c7aef1 to 161f945 Compare July 3, 2024 17:08
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch 2 times, most recently from 362807e to 7acd98b Compare July 22, 2024 20:04
@igor-aptos igor-aptos force-pushed the igor/gas_profiling_from_generator branch from 7acd98b to 2a4c159 Compare July 31, 2024 02:47
@igor-aptos igor-aptos enabled auto-merge (squash) July 31, 2024 05:54

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 2a4c159beb1dbc36cd31334e184590c27fa2e6e1

two traffics test: inner traffic : committed: 9444.831350173477 txn/s, latency: 4215.332139654817 ms, (p50: 4100 ms, p90: 4600 ms, p99: 10900 ms), latency samples: 3591140
two traffics test : committed: 99.97841155741057 txn/s, latency: 2144.278888888889 ms, (p50: 2100 ms, p90: 2300 ms, p99: 4600 ms), latency samples: 1800
Latency breakdown for phase 0: ["QsBatchToPos: max: 0.235, avg: 0.218", "QsPosToProposal: max: 1.879, avg: 1.810", "ConsensusProposalToOrdered: max: 0.317, avg: 0.290", "ConsensusOrderedToCommit: max: 0.398, avg: 0.385", "ConsensusProposalToCommit: max: 0.686, avg: 0.675"]
Max round gap was 1 [limit 4] at version 2028583. Max no progress secs was 5.871919 [limit 15] at version 2028583.
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1

Compatibility test results for 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1 (PR)
Upgrade the nodes to version: 2a4c159beb1dbc36cd31334e184590c27fa2e6e1
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1142.4540193854314 txn/s, submitted: 1144.0764941542886 txn/s, failed submission: 1.6224747688573786 txn/s, expired: 1.6224747688573786 txn/s, latency: 2725.7658652870764 ms, (p50: 2100 ms, p90: 4800 ms, p99: 9400 ms), latency samples: 98580
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1135.0889232245227 txn/s, submitted: 1137.34153073241 txn/s, failed submission: 2.2526075078875225 txn/s, expired: 2.2526075078875225 txn/s, latency: 2713.942290136932 ms, (p50: 2100 ms, p90: 5100 ms, p99: 8100 ms), latency samples: 100780
5. check swarm health
Compatibility test for 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1 passed
Upgrade the remaining nodes to version: 2a4c159beb1dbc36cd31334e184590c27fa2e6e1
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1110.0180845901357 txn/s, submitted: 1112.138237977511 txn/s, failed submission: 2.1201533873750473 txn/s, expired: 2.1201533873750473 txn/s, latency: 2837.6187606112053 ms, (p50: 2400 ms, p90: 4700 ms, p99: 8200 ms), latency samples: 94240
Test Ok

Copy link
Contributor

✅ Forge suite compat success on 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1

Compatibility test results for 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1 (PR)
1. Check liveness of validators at old version: 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5
compatibility::simple-validator-upgrade::liveness-check : committed: 6969.002360541069 txn/s, latency: 4073.90632569728 ms, (p50: 3300 ms, p90: 4200 ms, p99: 30800 ms), latency samples: 288980
2. Upgrading first Validator to new version: 2a4c159beb1dbc36cd31334e184590c27fa2e6e1
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 8050.516350626542 txn/s, latency: 3539.7783359600735 ms, (p50: 3900 ms, p90: 4100 ms, p99: 4300 ms), latency samples: 152280
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 7300.261016237316 txn/s, latency: 4382.886547879153 ms, (p50: 4100 ms, p90: 7400 ms, p99: 7600 ms), latency samples: 265460
3. Upgrading rest of first batch to new version: 2a4c159beb1dbc36cd31334e184590c27fa2e6e1
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 7193.568373881839 txn/s, latency: 3826.9357876210033 ms, (p50: 4000 ms, p90: 5200 ms, p99: 5300 ms), latency samples: 136360
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 7252.520415414632 txn/s, latency: 4296.039924885696 ms, (p50: 4300 ms, p90: 6800 ms, p99: 7000 ms), latency samples: 244960
4. upgrading second batch to new version: 2a4c159beb1dbc36cd31334e184590c27fa2e6e1
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 9345.232918481104 txn/s, latency: 2767.5899789029536 ms, (p50: 2400 ms, p90: 4900 ms, p99: 5500 ms), latency samples: 189600
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 6651.57077138395 txn/s, latency: 4207.425061432802 ms, (p50: 2900 ms, p90: 6400 ms, p99: 21300 ms), latency samples: 317420
5. check swarm health
Compatibility test for 1c2ee7082d6eff8c811ee25d6f5a7d00860a75d5 ==> 2a4c159beb1dbc36cd31334e184590c27fa2e6e1 passed
Test Ok

@igor-aptos igor-aptos merged commit 35e438b into main Jul 31, 2024
106 checks passed
@igor-aptos igor-aptos deleted the igor/gas_profiling_from_generator branch July 31, 2024 06:32
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.

None yet

3 participants