Skip to content

Conversation

@aviralgarg05
Copy link
Contributor

Fixes #14793

Context

This change adds tolerance thresholds to SLA checks that previously used strict equality for request counts/rates. Due to timing variations in test execution, actual counts can vary slightly from expected values, causing false SLA failures.

As noted in the PR #14429 discussion, the SLA failures in performance tests were identified as a separate issue to address. The pattern for handling this already exists in load-test/main.go which uses a 0.1% threshold.

Proposed Changes

  • scale-from-zero SLA 3: Changed from strict equality (results.Requests == uint64(parallel)) to allow 1 request tolerance. This handles cases like "24 requests when 25 expected" due to timing.

  • dataplane-probe SLA 2: Changed from strict equality to 0.1% tolerance (minimum 1 request), matching the pattern in load-test.

  • rollout-probe SLA 2: Changed from math.Round(results.Rate) == rate.Rate(time.Second) to allow 1% rate tolerance using math.Abs(results.Rate-expectedRate) <= tolerance.

Files Changed

File Change
test/performance/benchmarks/scale-from-zero/main.go SLA 3: 1 request tolerance
test/performance/benchmarks/dataplane-probe/main.go SLA 2: 0.1% tolerance
test/performance/benchmarks/rollout-probe/main.go SLA 2: 1% rate tolerance

Verification

  • go build ./test/performance/... - Passed
  • go vet ./test/performance/benchmarks/... - Passed
  • gofmt -s -d - No formatting issues
  • DCO sign-off included in commit

Release Note

Performance test SLAs now use tolerance thresholds instead of strict equality checks for request counts/rates, reducing false failures due to timing variations.

Fixes knative#14793

This change adds tolerance thresholds to SLA checks that previously
used strict equality for request counts/rates. Due to timing variations
in test execution, actual counts can vary slightly from expected values,
causing false SLA failures.

Changes:
- scale-from-zero SLA 3: Allow 1 request tolerance
- dataplane-probe SLA 2: Allow 0.1% tolerance (min 1 request)
- rollout-probe SLA 2: Allow 1% rate tolerance

This approach follows the pattern already established in load-test.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@knative-prow
Copy link

knative-prow bot commented Feb 6, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aviralgarg05
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot requested review from dsimansk, linkvt and skonto February 6, 2026 12:03
@knative-prow knative-prow bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 6, 2026
@knative-prow
Copy link

knative-prow bot commented Feb 6, 2026

Hi @aviralgarg05. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.21%. Comparing base (2cd582b) to head (737e48a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #16371      +/-   ##
==========================================
+ Coverage   80.18%   80.21%   +0.02%     
==========================================
  Files         216      216              
  Lines       13440    13440              
==========================================
+ Hits        10777    10781       +4     
+ Misses       2298     2296       -2     
+ Partials      365      363       -2     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate unstable performance-test SLAs

1 participant