Merged
Conversation
e06f62f to
5a88159
Compare
igor-aptos
approved these changes
Feb 6, 2026
| let re = regex::Regex::new("([1-9][0-9]*(,[0-9]+)*) samples") | ||
| .expect("should be able to build regex successfully"); | ||
| let graph_content = re.replace_all(&graph_content, |caps: &Captures| { | ||
| generate_flamegraph(self.to_folded_stack_lines(), title, |caps| { |
Contributor
There was a problem hiding this comment.
what does to_folded_stack_lines do?
Contributor
Author
There was a problem hiding this comment.
Converting the data into the format the flamegraph generator understands. Folded stack lines look like this:
funcA;funcB 10
funcA;funcB;funcC 50
georgemitenkov
approved these changes
Feb 6, 2026
692f710 to
66e2a83
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gas Profiler Report Improvements
This PR makes various improvements to the gas profile, making the generated gas report more aligned with the on-chain
FeeStatementand easier to understand.Summary Section
FeeStatementevent (execution gas, IO gas, storage fee, storage refund)Cost Categorization
CLI:
--fold-unique-stackflag for gas profilingAdded a new
--fold-unique-stackflag that can be used with--profile-gasto aggregate identical call paths in the gas report. This helps reduce the size of large reports by folding repeated function calls into single entries with combined costs.Other
Note
Medium Risk
Touches gas profiler accounting/reporting and CLI simulation flow; main risk is incorrect categorization/percentages or regression in report generation/output formatting, but changes are localized and covered by a new e2e test.
Overview
Improves the gas profiler’s HTML report to better match on-chain
FeeStatementby splitting execution vs IO gas, adding a top-level Summary (execution gas, IO gas, storage fee, storage refund), and recalculating breakdown percentages against the appropriate category totals (execution, IO, storage).Tightens aggregation output by filtering method tables to only include entries that look like function calls, refactors flamegraph generation into shared helpers, and updates internal accounting to store
execution_gasandio_gasseparately (withtotal()computed).Adds a new CLI flag
--fold-unique-stack(requires--profile-gas) to fold identical call paths before report generation, and introduces an e2e Move test package + Rust test to generate a report and sanity-check the new summary and sections.Written by Cursor Bugbot for commit 66e2a83. This will update automatically on new commits. Configure here.