-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add EVM transactions to FVM benchmark tests #5061
Conversation
import FungibleToken from 0x%s | ||
import FlowToken from 0x%s | ||
import TestContract from 0x%s | ||
import EVM from 0x%s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this import affect non-evm tests? would it make sense to only have this for fvm benchmarks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, but the important part of these tests is the comparative performance.
We can deduct the cost of that import by looking at the reference_tx
which is basically a (almost) no-op transaction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh nice, then it doesn't matter yeah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments but looks good. Nice findings
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5061 +/- ##
==========================================
+ Coverage 54.67% 56.21% +1.53%
==========================================
Files 675 977 +302
Lines 65888 91105 +25217
==========================================
+ Hits 36026 51214 +15188
- Misses 27128 36084 +8956
- Partials 2734 3807 +1073
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I added a benchmark (and a control) that calls EVM.run 100 times. Which allows us to benchmark EVM calls in relation to other calls.
The "control" is exactly the same FVM code except the call to
EVM.run
is skipped.The results are:
To get a comparison we can do the following operation:
(evm - evm_cotrol) / (transfer_tokens - reference_tx)
Which gets us that the
EVM.run
call is 2.57 times slower than a token transfer but costs 0.12 times the computation.