Skip to content

Conversation

rnro
Copy link
Contributor

@rnro rnro commented Mar 20, 2025

Motivation:

We have GitHub Actions CI running Swift Package Benchmark benchmarks on each commit but when the values don't match updating them can be time consuming. Particularly because you need to may need to exactly match the running environment in CI to get matching numbers.

Modifications:

Added a new dev script which pulls the output for the benchmark GitHub actions runs on a PR and updates your local threshold files

Result:

Easier benchmark threshold updates

Example interaction (actually on my branch of NIO SSL where I've messed with the thresholds so they need an update):

❯ FETCH_PR_URL=https://github.com/rnro/swift-nio-ssl/pull/5 OUTPUT_DIRECTORY=Benchmarks/Thresholds/ ../swift-nio/dev/thresholds-from-benchmark-output.sh
** Updating: Benchmarks/Thresholds//nightly-main/NIOSSHBenchmarks.SimpleHandshake.p90.json job:39048331461
** Nothing to update: rnro/swift-nio-ssl 5.10 job:39048331486
** Nothing to update: rnro/swift-nio-ssl 5.9 job:39048331454
** Nothing to update: rnro/swift-nio-ssl 6.0 job:39048331469
** Nothing to update: rnro/swift-nio-ssl nightly-next job:39048331466

Motivation:

We have GitHub Actions CI running Swift Package Benchmark benchmarks on
each commit but when the values don't match updating them can be
time-consuming. Particularly because you need to may need to exactly
match the running environment in CI to get matching numbers.

Modifications:

Added a new dev script which pulls the output for the benchmark GitHub
actions runs on a PR and updates your local threshold files

Result:

Easier benchmark threshold updates
@rnro rnro added the semver/none No version bump required. label Mar 20, 2025
@rnro rnro enabled auto-merge (squash) March 21, 2025 15:53
@rnro rnro merged commit 771810f into apple:main Mar 21, 2025
38 of 41 checks passed
@rnro rnro deleted the update_benchmarks_thresholds_script branch April 2, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants