Skip to content

🧪 Convert codspeed job to reusable workflow#1587

Merged
webknjaz merged 7 commits intoaio-libs:masterfrom
webknjaz:testing/gha-codspeed-benchmark-optimized
Oct 28, 2025
Merged

🧪 Convert codspeed job to reusable workflow#1587
webknjaz merged 7 commits intoaio-libs:masterfrom
webknjaz:testing/gha-codspeed-benchmark-optimized

Conversation

@webknjaz
Copy link
Member

@webknjaz webknjaz commented Oct 26, 2025

What do these changes do?

The Codspeed job has been converted into a reusable workflow. It is now called in one of two modes in the main one. In release automation, the benchmark measures the performance of the dists about to be released to PyPI. In all other cases, the job builds the project from source and does benchmarking on that. This means that now both release and pull request CI runs test the optimized builds of the C-extension.

Are there changes in behavior for the user?

Nope. Only for the contributors. The benchmark numbers will be aligned across PR and release builds.

Related issue number

N/A

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@webknjaz webknjaz requested review from bdraco and Copilot October 26, 2025 17:50
@webknjaz webknjaz self-assigned this Oct 26, 2025

This comment was marked as resolved.

@webknjaz webknjaz force-pushed the testing/gha-codspeed-benchmark-optimized branch 2 times, most recently from 7b04a27 to 218eaaa Compare October 26, 2025 21:24
This is needed for GHA testing to be able to run from tarballs.
@webknjaz webknjaz force-pushed the testing/gha-codspeed-benchmark-optimized branch 2 times, most recently from 2c44129 to 0ba30ce Compare October 27, 2025 23:42
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 27, 2025

CodSpeed Performance Report

Merging #1587 will improve performances by ×27

Comparing webknjaz:testing/gha-codspeed-benchmark-optimized (0083f7d) with master (a695cde)

Summary

⚡ 37 improvements
✅ 64 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
test_long_query 13,314.6 µs 484.4 µs ×27
test_long_query_with_pct 41.5 ms 3.2 ms ×13
test_quote_long_path 10,941.9 µs 406.3 µs ×27
test_quote_query_string 633.3 µs 74.3 µs ×8.5
test_quoter_ascii 206.1 µs 54.7 µs ×3.8
test_quoter_pct 488.4 µs 85.2 µs ×5.7
test_quoter_quote_utf8 1,630.5 µs 144.9 µs ×11
test_unquoter_long_ascii 12.3 ms 4.3 ms ×2.8
test_unquoter_long_pct 15.4 ms 6.9 ms ×2.2
test_unquoter_short 226.8 µs 118 µs +92.17%
test_extend_query_subclassed_str 1,173.7 µs 837.5 µs +40.13%
test_parse_query_uncached[long] 23.5 ms 14.6 ms +61.34%
test_parse_query_uncached[short] 1.9 ms 1.2 ms +55.48%
test_path_safe 57 µs 53.1 µs +7.23%
test_path_safe_uncached 280.1 µs 151.5 µs +84.87%
test_update_query_mapping 963.8 µs 661.9 µs +45.61%
test_update_query_mapping_with_existing_query 1,387.7 µs 875.1 µs +58.58%
test_update_query_sequence_mapping 5.8 ms 2.9 ms +98.83%
test_update_query_string 527.1 µs 404.3 µs +30.38%
test_url_build_access_raw_path 644.5 µs 526.5 µs +22.41%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

webknjaz added a commit to webknjaz/yarl that referenced this pull request Oct 27, 2025
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 27, 2025
@webknjaz webknjaz marked this pull request as ready for review October 27, 2025 23:54
Co-Authored-By: J. Nick Koston <nick@koston.org>
webknjaz added a commit to webknjaz/yarl that referenced this pull request Oct 28, 2025
@webknjaz webknjaz force-pushed the testing/gha-codspeed-benchmark-optimized branch from 9c9c17f to 3c3cc3d Compare October 28, 2025 00:10
@codecov
Copy link

codecov bot commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.60%. Comparing base (a695cde) to head (0083f7d).
⚠️ Report is 41 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1587   +/-   ##
=======================================
  Coverage   99.60%   99.60%           
=======================================
  Files          29       29           
  Lines        5835     5835           
  Branches      266      266           
=======================================
  Hits         5812     5812           
  Misses         19       19           
  Partials        4        4           
Flag Coverage Δ
CI-GHA 99.60% <ø> (ø)
MyPy 97.97% <ø> (ø)
OS-Linux 99.80% <ø> (ø)
OS-Windows 99.48% <ø> (ø)
OS-macOS 99.68% <ø> (ø)
Py-3.10.11 99.45% <ø> (ø)
Py-3.10.18 99.70% <ø> (ø)
Py-3.11.13 99.70% <ø> (ø)
Py-3.11.9 99.45% <ø> (ø)
Py-3.12.10 99.45% <ø> (ø)
Py-3.12.11 99.70% <ø> (ø)
Py-3.13.7 99.75% <ø> (ø)
Py-3.13.9 99.65% <ø> (ø)
Py-3.13.9t 99.75% <ø> (ø)
Py-3.14.0 99.75% <ø> (ø)
Py-3.14.0t 99.75% <ø> (ø)
Py-3.9.13 99.41% <ø> (ø)
Py-3.9.23 99.65% <ø> (ø)
Py-pypy3.10.16-7.3.19 99.36% <ø> (ø)
Py-pypy3.9.19-7.3.16 99.33% <ø> (ø)
VM-macos-latest 99.68% <ø> (ø)
VM-ubuntu-latest 99.80% <ø> (ø)
VM-windows-latest 99.48% <ø> (ø)
pytest 99.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@webknjaz webknjaz force-pushed the testing/gha-codspeed-benchmark-optimized branch from 3c3cc3d to 764e3d7 Compare October 28, 2025 12:53
@webknjaz webknjaz merged commit 8f2b854 into aio-libs:master Oct 28, 2025
63 of 65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided There is a change note present in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants