-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[scratchpad] sophisticated Criterion benchmarks #8388
Conversation
47d2ef7
to
de22bcc
Compare
} | ||
|
||
criterion_group!(benches, insert_to_empty); | ||
// criterion_group!(benches, insert_to_empty, update_exiting_keys_out_of_1mil); |
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.
delete?
group.finish(); | ||
|
||
fn gen_value(rng: &mut StdRng) -> AccountStateBlob { | ||
rng.gen::<[u8; 32]>().to_vec().into() |
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.
too small?
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's planned that the global SMT leaves carry account "authenticator"s which are hash values.
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.
Actually.. that plus the chaining structure. I'l do 100bytes then.
2e60178
to
069ca8f
Compare
/land |
Check generate root hash and proofs with this so that we don't need to rely on the DB (the JellyFish indeed) in tests and benchmarks. The update interface of the JellyFish might change and depend on the scratchpad instead.
Based on the NaiveSmt newly introduced, benchmark the updating time in these three cases: 1. inserting to an empty SMT; 2. inserting to an SMT with a committed base (root is "unknown" hence all information about the base tree must be known through the proof reader; 3. updating an SMT with some in mem nodes. Closes: diem#8388
Cluster Test Result
Repro cmd:
🎉 Land-blocking cluster test passed! 👌 |
Based on the NaiveSmt newly introduced, benchmark the updating time in these three cases: 1. inserting to an empty SMT; 2. inserting to an SMT with a committed base (root is "unknown" hence all information about the base tree must be known through the proof reader; 3. updating an SMT with some in mem nodes. Closes: diem#8388
Motivation
(This is on top of #8386, including its two commits before it got landed.)
Based on the NaiveSmt newly introduced, benchmark the updating time in these three cases: 1. inserting to an empty SMT; 2. inserting to an SMT with a committed base (root is "unknown" hence all information about the base tree must be known through the proof reader; 3. updating an SMT with some in mem nodes.
The
NaiveSmt
is under the feature "bench", and when running the bench "--features bench" needs to be in the command line, which is not ideal. ProbablyNaiveSmt
needs to be split into its own crate.Have you read the Contributing Guidelines on pull requests?
Y
Test Plan
benchmark updated
cargo bench -p scratchpad --features bench
Related PRs
#8386