-
Notifications
You must be signed in to change notification settings - Fork 598
ci: Add criterion performance regressions to PR workflows #2706
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: Add criterion performance regressions to PR workflows #2706
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2706 +/- ##
=====================================
Coverage 79.3% 79.3%
=====================================
Files 123 123
Lines 22670 22670
=====================================
Hits 17986 17986
Misses 4684 4684 ☔ View full report in Codecov by Sentry. |
|
Closes #251 |
2457584 to
e9b77ca
Compare
|
@cijothomas this is good to go. I'm not sure if the permissions are going to work for this to submit to the PR feedback from forks. I am hopeful that once the workflow is in main it will, but we'll see. If it doesn't I'll spend some more time looking at if we can set the perms up differently to achieve this (perhaps with repository settings) after this goes in. Regardless, you always see the performance comparison in the job run: |
merged. let us see ! |
|
@cijothomas fn benchmark_collect_histogram(b: &mut Bencher, n: usize) {
let r = SharedReader(Arc::new(ManualReader::default()));
let mtr = SdkMeterProvider::builder()
.with_reader(r.clone())
.build()
.meter("sdk/metric/bench/histogram");
for i in 0..n {
let h = mtr.u64_histogram(format!("fake_data_{i}")).build();
h.record(1, &[]);
}
let mut rm = ResourceMetrics {
resource: Resource::builder_empty().build(),
scope_metrics: Vec::new(),
};
b.iter(|| {
let _ = r.collect(&mut rm);
assert_eq!(rm.scope_metrics[0].metrics.len(), n); // Fails here
}) |
yes, we can comment it out with TODO, and fix that separately. |
This PR follows on from #2705, introducing a workflow that publishes a criterion regression comparison between
mainand the current branch.It cannot be merged and the build will not succeed until #2705 is in place.
Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes