-
Notifications
You must be signed in to change notification settings - Fork 204
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
Optimization: encode hash to hex only on log TRACE level set #6338
Conversation
trie/patriciaMerkleTrie_test.go
Outdated
@@ -1708,3 +1709,32 @@ func BenchmarkPatriciaMerkleTrie_RootHashAfterChanging30000NodesInBatchesOf200(b | |||
} | |||
} | |||
} | |||
|
|||
func TestTrieUpdateTimer(t *testing.T) { |
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.
This unit test:
- is skipped
- has no assertions
- does a print line
Instead, let's get the output of this test, or of the existing benchmarks - before & after the fix, and put the output (textual) in the PR description. Then, we can drop this test.
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.
yes, we can remove the test after we have the results.
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.
Fixed (transformed into a benchmark test).
📊 MultiversX Automated Test Report: View Report 🔄 Build Details:
🚀 Environment Variables:
|
📊 MultiversX Automated Test Report: View Report 🔄 Build Details:
🚀 Environment Variables:
|
📊 MultiversX Automated Test Report: View Report 🔄 Build Details:
🚀 Environment Variables:
|
📊 MultiversX Automated Test Report: View Report 🔄 Build Details:
🚀 Environment Variables:
|
Reasoning behind the pull request
Reasonable optimization on trie updates. Improved update times by roughly 30%.
Before fix:
After fix:
Proposed changes
Testing procedure
go test -run=^$ -bench ^BenchmarkPatriciaMerkleTrie_Update$ -benchtime=10x
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?