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: add the ability to trace gas consumption #2131

Closed
wants to merge 8 commits into from

Conversation

evan-forbes
Copy link
Member

@evan-forbes evan-forbes commented Jul 19, 2023

Overview

bringing back the gas monitor, not sure if we should merge this, but I'm using to regenerate all the gas charts, which can be found in #2132

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@codecov-commenter
Copy link

codecov-commenter commented Jul 19, 2023

Codecov Report

Merging #2131 (dcaaa58) into main (44034fd) will decrease coverage by 1.87%.
The diff coverage is 0.00%.

❗ Current head dcaaa58 differs from pull request most recent head b31cfef. Consider uploading reports for the commit b31cfef to get more accurate results

@@            Coverage Diff             @@
##             main    #2131      +/-   ##
==========================================
- Coverage   25.04%   23.17%   -1.87%     
==========================================
  Files         121      144      +23     
  Lines       13816    15912    +2096     
==========================================
+ Hits         3460     3688     +228     
- Misses      10000    11850    +1850     
- Partials      356      374      +18     
Files Changed Coverage Δ
app/ante.go 0.00% <0.00%> (ø)
app/app.go 4.42% <0.00%> (-0.04%) ⬇️
app/prepare_proposal.go 0.00% <0.00%> (ø)
app/process_proposal.go 0.00% <0.00%> (ø)
test/util/malicious/out_of_order_prepare.go 0.00% <0.00%> (ø)

... and 30 files with indirect coverage changes

@evan-forbes evan-forbes self-assigned this Jul 24, 2023
Copy link
Member Author

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

I'm not yet convinced that this is worth the maintenance costs.

Do we see ourselves tracing the consumption in the future? If not, we should close again. Opening the discussion to the reviewers.

@evan-forbes evan-forbes marked this pull request as ready for review July 25, 2023 15:13
@evan-forbes evan-forbes changed the title [WIP] feat: bring back the gas monitor feat: add the ability to trace gas consumption Jul 25, 2023
rootulp
rootulp previously approved these changes Jul 25, 2023
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Overall LGTM. Nothing in the PR seems particularly difficult to maintain and the Python script is a separate Gist so it seems safe to merge but I'm curious what other reviewers think.

tools/gasmonitor/README.md Outdated Show resolved Hide resolved
tools/gasmonitor/gas_monitor.go Outdated Show resolved Hide resolved
tools/gasmonitor/gas_monitor.go Outdated Show resolved Hide resolved
tools/gasmonitor/integration_test.go Outdated Show resolved Hide resolved
tools/gasmonitor/integration_test.go Outdated Show resolved Hide resolved
@cmwaters
Copy link
Contributor

cmwaters commented Aug 8, 2023

Do we see ourselves tracing the consumption in the future? If not, we should close again. Opening the discussion to the reviewers.

I guess do we see the calculations of gas being altered in the future (I'm not sure if an application can even set the GasConfig currently)?

@evan-forbes
Copy link
Member Author

evan-forbes commented Aug 8, 2023

something like this might be useful if we ever run into a gas bug, or if we ever want to fine tune resource pricing. but until then... this is a lot of extra code!

@evan-forbes
Copy link
Member Author

I'm leaning towards closing and just resurrecting it as needed, similar to what we did here

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.

4 participants