-
Notifications
You must be signed in to change notification settings - Fork 65
ci: deserialize cargo bench result #9624
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
ci: deserialize cargo bench result #9624
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Benchmark movements: No major performance changes detected. |
f3db96f to
ac3634c
Compare
92c0d9c to
16f9e95
Compare
ac3634c to
4623274
Compare
16f9e95 to
7999e17
Compare
4623274 to
453f020
Compare
meship-starkware
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.
@meship-starkware reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @avi-starkware)
bench_tools/src/benches/dummy_bench.rs line 14 at r1 (raw file):
c.bench_function("dummy_sum_1000", |b| b.iter(|| dummy_function(black_box(1000)))); }
Is this the function that creates the benchmark files? Where are we going to use it?
Can you add a small documentation on the purpose of this function?
Code quote:
#[allow(dead_code)]
fn dummy_benchmark(c: &mut Criterion) {
c.bench_function("dummy_sum_100", |b| b.iter(|| dummy_function(black_box(100))));
c.bench_function("dummy_sum_1000", |b| b.iter(|| dummy_function(black_box(1000))));
}|
Why is Additionally, criterion::black_box is deprecated (see docs) you should use std::docs::black_box instead Code quote: c.bench_function("dummy_sum_100", |b| b.iter(|| dummy_function(black_box(100)))); |
|
Previously, avi-starkware (Avi Cohen) wrote…
correction: it is |
avi-starkware
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.
@avi-starkware reviewed 10 of 10 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware and @meship-starkware)
bench_tools/src/types/estimates_test.rs line 30 at r1 (raw file):
// 2) Collect ALL estimates.json files under target/criterion/**/new/ let patterns =
Why do you collect all estimates.json files and not just the ones related to dummy_benches?
Code quote:
// 2) Collect ALL estimates.json files under target/criterion/**/new/
let patterns =7999e17 to
db0e858
Compare
bd42739 to
576ba64
Compare
AvivYossef-starkware
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.
Reviewable status: 0 of 12 files reviewed, 3 unresolved discussions (waiting on @avi-starkware and @meship-starkware)
bench_tools/src/types/estimates_test.rs line 30 at r1 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
Why do you collect all estimates.json files and not just the ones related to dummy_benches?
Thanks
bench_tools/src/benches/dummy_bench.rs line 11 at r1 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
correction: it is
std::hint::black_box
According to AI, the compiler might delete the dummy_function calculation because we don't use the result.
bench_tools/src/benches/dummy_bench.rs line 14 at r1 (raw file):
Previously, meship-starkware (Meshi Peled) wrote…
Is this the function that creates the benchmark files? Where are we going to use it?
Can you add a small documentation on the purpose of this function?
It's a test util, we use it in estimates_test
avi-starkware
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.
@avi-starkware reviewed 9 of 12 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: 10 of 12 files reviewed, 3 unresolved discussions (waiting on @meship-starkware)
crates/bench_tools/src/types/estimates_test.rs line 27 at r3 (raw file):
fn workspace_root(bench_tools_crate_dir: PathBuf) -> PathBuf { bench_tools_crate_dir.parent().unwrap().parent().unwrap().to_path_buf() }
Consider using workspace_root() from the crate infra_utils.
Code quote:
fn workspace_root(bench_tools_crate_dir: PathBuf) -> PathBuf {
bench_tools_crate_dir.parent().unwrap().parent().unwrap().to_path_buf()
}crates/bench_tools/src/types/estimates_test.rs line 87 at r3 (raw file):
fn deserialize_dummy_bench_estimates(dummy_bench_results_dir: PathBuf, dummy_bench_names: &[&str]) { assert_deserialize_dummy_bench_estimates(&dummy_bench_results_dir, dummy_bench_names); }
Why is this test needed?
Code quote:
#[rstest]
/// Test that Estimates can be deserialized from the saved results.
fn deserialize_dummy_bench_estimates(dummy_bench_results_dir: PathBuf, dummy_bench_names: &[&str]) {
assert_deserialize_dummy_bench_estimates(&dummy_bench_results_dir, dummy_bench_names);
}576ba64 to
405ef34
Compare
db0e858 to
14bd2ea
Compare
405ef34 to
70b4f77
Compare
AvivYossef-starkware
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.
Reviewable status: 7 of 12 files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @meship-starkware)
crates/bench_tools/src/types/estimates_test.rs line 27 at r3 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
Consider using
workspace_root()from the crateinfra_utils.
Done
crates/bench_tools/src/types/estimates_test.rs line 87 at r3 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
Why is this test needed?
to verify that the struct deserializes the json successfully
70b4f77 to
b2a3463
Compare
avi-starkware
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.
@avi-starkware reviewed 2 of 3 files at r4, 1 of 1 files at r5, all commit messages.
Reviewable status: 10 of 12 files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware and @meship-starkware)
crates/bench_tools/src/types/estimates_test.rs line 87 at r3 (raw file):
Previously, AvivYossef-starkware wrote…
to verify that the struct deserializes the json successfully
But isn't this verified in the test above as well?
b2a3463 to
82ff5e6
Compare
Merge activity
|
AvivYossef-starkware
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.
Reviewable status: 9 of 12 files reviewed, 1 unresolved discussion (waiting on @avi-starkware and @meship-starkware)
crates/bench_tools/src/types/estimates_test.rs line 87 at r3 (raw file):
Previously, avi-starkware (Avi Cohen) wrote…
But isn't this verified in the test above as well?
But the test above is ignored because I dont want to actual run the benechmark in the CI
avi-starkware
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.
@avi-starkware reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: 10 of 12 files reviewed, all discussions resolved (waiting on @meship-starkware)
avi-starkware
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.
@avi-starkware reviewed 2 of 12 files at r2.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)
avi-starkware
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @meship-starkware)

No description provided.