Skip to content

fix(trend): a rising error rate is the regression - #566

Merged
bmscomp merged 1 commit into
mainfrom
fix/trend-error-rate-direction
Oct 31, 2026
Merged

bmscomp merged 1 commit into
mainfrom
fix/trend-error-rate-direction

Conversation

@bmscomp

@bmscomp bmscomp commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Why

Audit finding 10 (2026-10-29). TrendService.detectRegressions treated every metric except latency as higher-is-better. For errorRate that is backwards. Against a baseline of 0.3125, a run whose error rate rose to 0.75 was not flagged, and an error-free run (0, -100%) was flagged as the regression. So kates trend errorRate hid real regressions and raised alarms on improvements.

What changed

  • errorRate now joins the latencies as higher-is-worse: a run is flagged when it is more than 20% above the baseline. Throughput is unchanged (flagged when more than 20% below).
  • computeBrokerTrend reads the same ReportSummary metrics through the same detectRegressions, so the broker trend's errorRate is fixed too. That rule exists only in TrendService. BaselineService has its own rule for errorRate (+0.001) and is untouched.
  • docs/book/11-api-reference.md, Trend Analysis: one sentence saying which direction counts for each metric. Nothing said it before.
  • The anchored MCP ref into TrendService.java (53-54,185-189 in cli/cmd/mcp_caveats.go) sits above the edit, so it doesn't move.

Tests

  • New TrendServiceTest.aRisingErrorRateIsTheRegression: four LOAD runs with 1/4, 1/4, 3/4 and 0/4 failed tasks. The 0.75 run is the only regression. Without the fix the test fails, flagging the error-free run instead.

Local runs:

  • cd kates && ./mvnw test -Dquarkus.grpc.codegen.skip=true -Dquarkus.http.test-port=0: BUILD SUCCESS, 1789 tests, 0 failures, 0 errors, 3 skipped
  • spotless:check (JDK 25): clean
  • cd cli && go test -count=1 ./cmd -run TestMCPCaveat: pass
  • scripts/check-book-style.sh: OK

Only CI can run the integration tests, the native image, Docker, CodeQL and the Quarto book render.

Deliberately not done

  • Finding 17 (the P99.9 trend reads 0) is in the same file but gets its own PR.

detectRegressions treated every metric but latency as higher-is-better.
For errorRate that is backwards: a run going from 0.25 to 0.75 against
the baseline was not flagged, and an error-free run was flagged as a
regression. The error rate now joins latency as higher-is-worse.

The book's trend section now says which direction counts for each metric.
@bmscomp
bmscomp merged commit 7855431 into main Oct 31, 2026
61 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.

1 participant