-
Notifications
You must be signed in to change notification settings - Fork 0
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
CodSpeed reporting wrong numbers #82
Comments
Appears to be a CodSpeed thing, unrelated to Graphite merge queue. Another example from today: oxc-project/oxc#4476 Codspeed gets "stuck" comparing to "base" commit ccb1835, whereas the PR was rebased on latest main, so the merge commit for that PR that benchmarks are running on is based on latest main 42a2519. |
Have posted on CodSpeed support Discord: https://discord.com/channels/1065233827569598464/1065686090452828251/threads/1266360428930535526 |
The conclusion is base should always trigger benchmark on any Rust changes. This case is change in rustc version. |
I've moved this back to backlog and reopened. I didn't take quite the same conclusion from this as Boshen. It seems to me that the problem is a race condition - if a PR completes its benchmark run before the latest commit on main completes its, then CodSpeed uses previous commit on main as the base for comparison. We could fix this by adding a check to the upload action to make sure benchmarks aren't still running on base commit. If they are, wait for it to finish before uploading. As we're already handling uploading benchmarks ourselves for purpose of sharding, we can handle this quite easily. I think this problem has become more common recently because of our use of Graphite merge queue means it's constantly merging stuff and running benchmarks in quick succession. |
The problem
I've seen quite a few times recently that benchmark measures CodSpeed gives on PRs are erroneous.
This is a problem when doing perf work, as you can't tell if what you're doing is good or not.
e.g. PR oxc-project/oxc#4214 showed initially a giving 0 speed-up, but then benchmarks re-ran after the PR below it in the stack was merged, and suddenly it shows 6% perf improvement. https://codspeed.io/oxc-project/oxc/branches/07-12-perf_semantic_reduce_lookups
That's wrong. The PR gives 0 perf improvement.
Reason was that in the last run, CodSpeed did the comparison to 2 commits back (3016f03), rather than 1 back. So 6% result shown included the perf boost of oxc-project/oxc#4213 which is the commit that preceded it.
Why?
I am not sure why this has started happening recently. Could be:
Solutions
Because we intercept and store bench results and upload them to CodSpeed our end, we could potentially get our Github action to check that benchmarks for previous commit have completed and been uploaded to CodSpeed already, before submitting results for current commit. If not, wait until they are.
The text was updated successfully, but these errors were encountered: