-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: update and fix Merkle benchmarks (#5964)
Description --- Updates and fixes Merkle benchmarks. Closes #5962. Motivation and Context --- Recent work in #5954 removes mutable Merkle mountain range (MMR) code, which became unused with the addition of sparse Merkle trees (SMTs). Some existing benchmarks were removed or moved to accommodate this change. During review, some minor issues were identified: - An existing MMR and SMT benchmark reused tree structures between benchmark iterations, which could provide incorrect timing data. - New SMT benchmarks used bespoke timing code that didn't take full advantage of Criterion's functionality. This PR fixes these issues, albeit at the expense of more benchmark setup overhead. This shouldn't be particularly problematic, as benchmarks are only run manually as needed. How Has This Been Tested? --- The benchmarks run and appear to give reasonable data. What process can a PR reviewer use to test or verify this change? --- Check that the updated and new benchmarks exercise the desired functionality. Check that operations use fresh tree structures for each test iteration as needed, to ensure correct timing data.
- Loading branch information
1 parent
14e334a
commit 3886df4
Showing
2 changed files
with
131 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters