-
Notifications
You must be signed in to change notification settings - Fork 268
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
Adds a bench for hash_account() #47
Conversation
165, // the size of an spl token account | ||
200, // the size of a stake account |
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.
Since accounts in this size range make up ~90% of all accounts on mnb, we should optimize hashing for them. In order to quantify any improvements, we gotta benchmark it!
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.
lgtm
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #47 +/- ##
=========================================
- Coverage 81.8% 81.8% -0.1%
=========================================
Files 837 837
Lines 225922 225922
=========================================
- Hits 184955 184888 -67
- Misses 40967 41034 +67 |
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.
lgtm!
Problem
While tweaking the implementation for
AccountsDb::hash_account_data()
, I didn't have a way to benchmark my changes to see if there were any improvements.Summary of Changes
Add a bench for
hash_account()
.Details
After running the benchmark, criterion displays useful information. Here's an example of the text results:
And here's two of the many webpages that gets produced.