Skip to content
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

Add coverage benchmark #213

Merged
merged 3 commits into from
Jun 6, 2022
Merged

Add coverage benchmark #213

merged 3 commits into from
Jun 6, 2022

Conversation

kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Jun 6, 2022

Add a coverage benchmark to help benchmarking and avoid regressions such as python/cpython#93516.
Benchmark result 3.10 vs 3.12 main branch.

Benchmark 3.10 3.12
coverage 96.8 ms 204 ms: 2.11x slower

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for doing something about this.

Question for @kumaraditya303 -- Have you actually tried this before and after the regression you mentioned as example?

Question for @ericsnowcurrently -- Do you agree this is useful?

@kumaraditya303
Copy link
Contributor Author

Have you actually tried this before and after the regression you mentioned as example?

@gvanrossum: The regression I linked above 1 is not caused by a single change but rather accumulation of multiple slowdown caused by multiple changes of which the most significant ones being python/cpython#91666 and python/cpython#27077. Since there is no benchmark in pyperformance to exercise coverage performance, the slowdown was unnoticed. Once this benchmark is added, it will help us pinpoint which commits caused the most slowdown with a simple git bisect between 3.10 and main branches.

Footnotes

  1. https://github.com/python/pyperformance/pull/213#issue-1261503016

@gvanrossum
Copy link
Member

Nevertheless it would be interesting to see the numbers of running this BM on the state before and after said commits to demonstrate its usefulness.

@kumaraditya303
Copy link
Contributor Author

I am running the benchmarks now, will post soon.

@kumaraditya303
Copy link
Contributor Author

@gvanrossum Benchmarking before and after python/cpython@944fffe commit

Results:

Benchmark before after
coverage 161 ms 213 ms: 1.32x slower

@gvanrossum gvanrossum merged commit 01d3e81 into python:main Jun 6, 2022
@ericsnowcurrently
Copy link
Member

Question for @ericsnowcurrently -- Do you agree this is useful?

Yeah, it's a helpful indicator of impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants