flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

[FVM] Refactoring TransactionProcedure trace span creation

Open Tonix517 opened this issue 2 years ago • 2 comments

  • Adding IsSampled() to TransactionProcedure. Taking the message from computer.go to TransactionProcedure to make code slightly easier to read.
  • Isolating boilerplace code for creating tracer span for TransactionProcedure into a function.

Test

  • [X] all fvm UT

Tonix517 avatar Oct 14 '22 17:10 Tonix517

FVM Benchstat comparison

This branch with compared with the base branch onflow:master commit d6b6b69d301ae90bb36e060691b0046365dda068

The command (for i in {1..10}; do go test ./fvm ./engine/execution/computation --bench . --tags relic -shuffle=on --benchmem --run ^$; done) was used.

Collapsed results for better readability

old.txtnew.txt
time/opdelta
ComputeBlock/16/cols/128/txes-25.48s ± 0%5.62s ± 0%~(p=1.000 n=1+1)
 
us/txdelta
ComputeBlock/16/cols/128/txes-22.67k ± 0%2.74k ± 0%~(p=1.000 n=1+1)
 
alloc/opdelta
ComputeBlock/16/cols/128/txes-21.28GB ± 0%1.28GB ± 0%~(p=1.000 n=1+1)
 
allocs/opdelta
ComputeBlock/16/cols/128/txes-219.9M ± 0%19.9M ± 0%~(p=1.000 n=1+1)
 

github-actions[bot] avatar Oct 14 '22 18:10 github-actions[bot]

Codecov Report

Merging #3395 (857ef86) into master (95ca605) will increase coverage by 0.00%. The diff coverage is 0.00%.

@@           Coverage Diff            @@
##           master    #3395    +/-   ##
========================================
  Coverage   55.47%   55.47%            
========================================
  Files         752      752            
  Lines       68292    68496   +204     
========================================
+ Hits        37886    38000   +114     
- Misses      27334    27424    +90     
  Partials     3072     3072            
Flag Coverage Δ
unittests 55.47% <0.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fvm/transaction.go 87.93% <0.00%> (-3.15%) :arrow_down:
fvm/transactionInvoker.go 56.52% <0.00%> (ø)
fvm/transactionSequenceNum.go 66.66% <0.00%> (ø)
fvm/transactionVerifier.go 77.90% <0.00%> (ø)
insecure/orchestrator/corrupted_connection.go 74.50% <0.00%> (-7.85%) :arrow_down:
fvm/environment/unsafe_random_generator.go 69.44% <0.00%> (-7.48%) :arrow_down:
network/p2p/dns/resolver.go 91.51% <0.00%> (-4.85%) :arrow_down:
fvm/environment/uuids.go 65.51% <0.00%> (-3.24%) :arrow_down:
consensus/hotstuff/eventloop/event_loop.go 73.46% <0.00%> (-1.37%) :arrow_down:
engine/consensus/compliance/core.go 74.30% <0.00%> (ø)
... and 12 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Oct 14 '22 18:10 codecov-commenter

bors merge

Tonix517 avatar Oct 17 '22 20:10 Tonix517