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

Expose EnableGasTracing as an env_var #7750

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

geoff-vball
Copy link
Contributor

@geoff-vball geoff-vball commented Dec 10, 2021

Closes issue #7648

@geoff-vball geoff-vball requested a review from a team as a code owner December 10, 2021 01:32
@codecov
Copy link

codecov bot commented Dec 10, 2021

Codecov Report

Merging #7750 (9108828) into master (a0d76bd) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7750      +/-   ##
==========================================
- Coverage   39.57%   39.54%   -0.03%     
==========================================
  Files         640      640              
  Lines       68468    68468              
==========================================
- Hits        27095    27079      -16     
- Misses      36722    36738      +16     
  Partials     4651     4651              
Impacted Files Coverage Δ
chain/vm/runtime.go 55.07% <ø> (ø)
chain/actors/builtin/miner/diff.go 48.52% <0.00%> (-10.30%) ⬇️
markets/retrievaladapter/client_blockstore.go 62.50% <0.00%> (-6.25%) ⬇️
miner/warmup.go 76.19% <0.00%> (-4.77%) ⬇️
chain/stmgr/execute.go 86.95% <0.00%> (-4.35%) ⬇️
node/hello/hello.go 63.63% <0.00%> (-3.41%) ⬇️
miner/miner.go 54.96% <0.00%> (-2.32%) ⬇️
extern/storage-sealing/fsm.go 55.77% <0.00%> (-1.60%) ⬇️
chain/consensus/filcns/filecoin.go 51.21% <0.00%> (-0.89%) ⬇️
chain/messagepool/messagepool.go 57.79% <0.00%> (-0.87%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a0d76bd...9108828. Read the comment docs.

@geoff-vball geoff-vball force-pushed the gstuart/lotus-vm-gas-tracing-env-var branch from cbec238 to 25420cf Compare December 10, 2021 01:54
@geoff-vball geoff-vball changed the title Gstuart/lotus vm gas tracing env var Gstuart/lotus Expose EnableGasTracing as an env_var Dec 10, 2021
@geoff-vball geoff-vball changed the title Gstuart/lotus Expose EnableGasTracing as an env_var Expose EnableGasTracing as an env_var Dec 10, 2021
@geoff-vball geoff-vball force-pushed the gstuart/lotus-vm-gas-tracing-env-var branch 4 times, most recently from 4e9957e to 070d17f Compare December 10, 2021 03:48
@@ -51,8 +52,7 @@ func (m *Message) ValueReceived() abi.TokenAmount {
return m.msg.Value
}

// EnableGasTracing, if true, outputs gas tracing in execution traces.
var EnableGasTracing = false
const EnableGasTracingEnvVar = "LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd do

Suggested change
const EnableGasTracingEnvVar = "LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW"
// EnableGasTracing, if true, outputs gas tracing in execution traces.
var EnableGasTracing = os.Getenv("LOTUS_VM_ENABLE_GAS_TRACING_VERY_SLOW") == "1"

So that we don't have to lookup the env var on every gas charge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed, thanks that makes it a lot simpler.

@geoff-vball geoff-vball force-pushed the gstuart/lotus-vm-gas-tracing-env-var branch from 070d17f to 9108828 Compare December 10, 2021 22:29
@magik6k magik6k merged commit dc26f3b into master Dec 12, 2021
@magik6k magik6k deleted the gstuart/lotus-vm-gas-tracing-env-var branch December 12, 2021 11:16
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.

3 participants