-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add benchmarking suite #25
Merged
Merged
+1,408
−52
Conversation
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
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
=======================================
Coverage 84.77% 84.77%
=======================================
Files 8 8
Lines 1241 1241
=======================================
Hits 1052 1052
Misses 138 138
Partials 51 51 ☔ View full report in Codecov by Sentry. |
Olshansk
requested changes
Sep 25, 2023
Olshansk
previously approved these changes
Sep 26, 2023
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 a couple more comments but feel free to merge after.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Summary generated by Reviewpad on 26 Sep 23 07:27 UTC
This pull request includes the following changes:
The Makefile has been modified to add several targets and their corresponding commands. The new targets are: help, list, test_all, benchmark_all, benchmark_smt, benchmark_smt_fill, benchmark_smt_ops, benchmark_smst, benchmark_smst_fill, and benchmark_smst_ops. Each target has a description comment above its definition.
The file diff adds two test functions: "TestSMT_ProofSizes" and "TestSMST_ProofSizes". These tests create a sparse Merkle tree and perform various operations on it. The tests calculate and log the average, minimum, and maximum sizes of serialized proofs and compacted proofs for different tree sizes ranging from 100,000 to 10,000,000.
The file "bench_test.go" has been deleted. It used to contain benchmark functions for updating and deleting data in a Sparse Merkle Tree. These benchmarks relied on a Key-Value Store and utilized the "testing" package. The functions performed operations such as updating and deleting data using the Sparse Merkle Tree. The benchmarking logic included timing and memory allocation measurements. The Key-Value Store was stopped at the end of each benchmark.
A new file called "bench_utils_test.go" has been introduced in the "benchmarks" package. The file contains benchmarking functions for the "smt" package and the "smst" package. It also includes helper functions for setting up the data structures and benchmarking functions for them. Overall, this file provides testing and benchmarking capabilities for the "smt" and "smst" packages.
Changes have been made to the ".gitignore" file to ignore the ".idea/" directory and remove the "testdata/" directory from being ignored.
The
.github/workflows/test.yml
file has been modified. Specifically, therun
section of theCreate coverage report and run tests
job has been updated. Additionally, a new condition has been added to theSanitize test results
step.The file "bench_leaf_test.go" has been modified to add two benchmark test functions: "BenchmarkSMTLeafSizes_Fill" and "BenchmarkSMSTLeafSizes_Fill". These benchmarks test the performance of filling a sparse Merkle tree with different sizes of leaves. They use different objects and parameters for the tree update operation.
Please let me know if you need further assistance with this diff!
Issue
Fixes #9
Type of change
Please mark the relevant option(s):
List of changes
Testing
go test ...
go test ...
go test -v
Required Checklist
godoc
format comments on touched members (see: tip.golang.org/doc/comment)If Applicable Checklist