-
Notifications
You must be signed in to change notification settings - Fork 953
chore: sort storage keys and test files in blockchaintest output #3186
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
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #3186 will not alter performanceComparing Summary
|
| .map(DirEntry::into_path) | ||
| .collect() | ||
| .collect(); | ||
| files.sort(); |
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 is better for file names to be in order of reading
| for (key, value) in storage.iter().take(5) { | ||
| let mut sorted_storage: Vec<_> = storage.iter().collect(); | ||
| sorted_storage.sort_by_key(|(key, _)| *key); | ||
| for (key, value) in sorted_storage.iter().take(5) { |
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 is nice, i would even remove that 5 slot limit and print all of them
| for (key, value) in storage.iter().take(5) { | ||
| let mut sorted_storage: Vec<_> = storage.iter().collect(); | ||
| sorted_storage.sort_by_key(|(key, _)| *key); | ||
| for (key, value) in sorted_storage.iter().take(5) { |
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.
Makes sense, would remove 5 limit, for tests we want to read them all
rakita
left a comment
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.
Makes sense, left few nit comments
Realized there are more section need to be optimize like #3182
Any though?