Skip to content

Conversation

@kylos101
Copy link
Contributor

@kylos101 kylos101 commented Jan 6, 2026

Motivation

The TestS3Cache_ExistingPackagesBatchOptimization/10-packages test was flaking due to timing variability in performance measurements.

Changes

Relaxed the speedup threshold from 0.75 to 0.45 for the 10-package test case to account for goroutine scheduling variance that can cause the sequential method to occasionally outperform the batch method at small package counts.

Testing

The lowest observed speedup was 0.51x, providing margin above the 0.45 threshold.

To verify the fix, run the full test 1000 times:

go test -count=1000 -run "^TestS3Cache_ExistingPackagesBatchOptimization$" ./pkg/leeway/cache/remote/

Reduce speedup threshold from 0.75 to 0.45 to account for timing
variability in small package counts where goroutine scheduling can
cause the sequential method to occasionally outperform batch.

Co-authored-by: Ona <[email protected]>
@kylos101 kylos101 marked this pull request as ready for review January 6, 2026 18:23
@kylos101 kylos101 merged commit 8206b4e into main Jan 6, 2026
7 checks passed
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