Skip to content

fix(ci): strip colour from the benchmark output before it is pasted into a PR comment - #997

Merged
thinkclay merged 1 commit into
mainfrom
fix/benchmark-comment-no-color
Oct 6, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/benchmark-comment-no-color

Conversation

@thinkclay

@thinkclay thinkclay commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #995, which made the benchmark produce real figures for the first time. The comment it posted wrapped every one of them in raw escape codes:

^[[0m^[[38;5;245mREST: GET /v1/jobs (paginated list):^[[0m   → Average response time: 84.36ms

deno bench colourises even when stdout is a pipe, and benchmark-results.txt is pasted verbatim into the comment body. NO_COLOR: '1' fixes it at the source, so the uploaded artifact is clean too.

Verified locally with CI's exact env: 0 escape sequences, summary rows unchanged.

Pushed with SKIP_PREPUSH, deliberately

pnpm prepush could not pass on this machine, and not because of this change. The gated api suite wandered across four runs, with different tests failing each time and none related to a workflow env var:

run result failures
earlier today 163 / 0 —
after I ran benchmarks 161 / 2 office, resume
next 148 / 15 cascade
last 160 / 3 resume ×2, reviews

The shared local stack has accumulated 99 stale @example.* users and 60 test organizations, which collide with the fixed-email fixtures, and another session is loading the same stack — the last run took 3m52s against 41s earlier. CI runs on a clean stack and passed 163/0 on #995 minutes before this branch was cut.

Clearing it needs pnpm supa db reset, which would destroy the other session's data on that stack, so the skip was the less damaging option. It was authorised explicitly rather than taken quietly. CI is the real check here — if the gated suite is red on this PR, that is a genuine signal and I was wrong about the cause.

Related

The benchmark also exited 1 on one local run with AbortError: The signal has been aborted in the concurrency case, under that same contention. That is the flakiness continue-on-error exists for, and #995's verify step still passes because the results file is non-empty — working as designed. One more reason not to read these figures as precise; see the caveats on #987.

🤖 Generated with Claude Code

…nto a PR comment

#995 made the benchmark produce real figures, and the first comment it
posted wrapped every one of them in raw escape codes:

    ^[[0m^[[38;5;245mREST: GET /v1/jobs: ^[[0m → Average response time: 84.36ms

deno bench colourises even when stdout is a pipe, and benchmark-results.txt
is pasted verbatim into the comment body. NO_COLOR=1 fixes it at the source,
so the artifact is clean too.

Verified locally with CI's env: 0 escape sequences in the output, summary
rows unchanged.

Co-Authored-By: Claude Opus 5 <[email protected]>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Results

    CPU | AMD EPYC 7763 64-Core Processor
Runtime | Deno 2.9.7 (x86_64-unknown-linux-gnu)

file:///home/runner/work/SaaS/SaaS/packages/supabase/functions/api/__tests__/benchmarks/rest-vs-trpc.bench.ts

| benchmark                                     | time/iter (avg) |        iter/s |      (min … max)      |      p75 |      p99 |     p995 |
| --------------------------------------------- | --------------- | ------------- | --------------------- | -------- | -------- | -------- |

group jobs-list
REST: GET /v1/jobs (paginated list):   → Average response time: 92.81ms
REST: GET /v1/jobs (paginated list):   → Average response time: 82.93ms
REST: GET /v1/jobs (paginated list):   → Average response time: 80.17ms
REST: GET /v1/jobs (paginated list):   → Average response time: 83.04ms
REST: GET /v1/jobs (paginated list):   → Average response time: 86.03ms
| REST: GET /v1/jobs (paginated list)           |           3.2 s |           0.3 | (   3.2 s …    3.3 s) |    3.2 s |    3.3 s |    3.3 s |

group job-details
REST: GET /v1/jobs/:id (single job):   → Average response time: 86.26ms
REST: GET /v1/jobs/:id (single job):   → Average response time: 83.03ms
REST: GET /v1/jobs/:id (single job):   → Average response time: 87.31ms
REST: GET /v1/jobs/:id (single job):   → Average response time: 127.94ms
REST: GET /v1/jobs/:id (single job):   → Average response time: 82.83ms
| REST: GET /v1/jobs/:id (single job)           |           3.5 s |           0.3 | (   3.2 s …    4.1 s) |    3.3 s |    4.1 s |    4.1 s |

group application-create
REST: POST /v1/applications (create):   → Average response time: 85.03ms
REST: POST /v1/applications (create):   → Average response time: 85.69ms
REST: POST /v1/applications (create):   → Average response time: 88.25ms
REST: POST /v1/applications (create):   → Average response time: 104.81ms
REST: POST /v1/applications (create):   → Average response time: 83.61ms
| REST: POST /v1/applications (create)          |           5.8 s |           0.2 | (   5.5 s …    6.5 s) |    5.7 s |    6.5 s |    6.5 s |

group concurrency
REST: Concurrent GET /v1/jobs (10 parallel):   → Throughput: 20.77 req/s
REST: Concurrent GET /v1/jobs (10 parallel):   → Average time per batch: 481.38ms
REST: Concurrent GET /v1/jobs (10 parallel):   → Throughput: 20.96 req/s
REST: Concurrent GET /v1/jobs (10 parallel):   → Average time per batch: 477.15ms
REST: Concurrent GET /v1/jobs (10 parallel):   → Throughput: 17.87 req/s
REST: Concurrent GET /v1/jobs (10 parallel):   → Average time per batch: 559.73ms
REST: Concurrent GET /v1/jobs (10 parallel):   → Throughput: 17.07 req/s
REST: Concurrent GET /v1/jobs (10 parallel):   → Average time per batch: 585.81ms
REST: Concurrent GET /v1/jobs (10 parallel):   → Throughput: 17.63 req/s
REST: Concurrent GET /v1/jobs (10 parallel):   → Average time per batch: 567.19ms
| REST: Concurrent GET /v1/jobs (10 parallel)   |           9.9 s |           0.1 | (   9.5 s …   10.6 s) |    9.9 s |   10.6 s |   10.6 s |

group filtered-queries
REST: GET /v1/jobs with multiple filters:   → Average response time: 132.27ms
REST: GET /v1/jobs with multiple filters:   → Average response time: 89.92ms
REST: GET /v1/jobs with multiple filters:   → Average response time: 91.05ms
REST: GET /v1/jobs with multiple filters:   → Average response time: 91.46ms
REST: GET /v1/jobs with multiple filters:   → Average response time: 82.30ms
| REST: GET /v1/jobs with multiple filters      |           3.4 s |           0.3 | (   3.2 s …    3.5 s) |    3.4 s |    3.5 s |    3.5 s |


@thinkclay
thinkclay merged commit e6c7ab1 into main Oct 6, 2026
15 checks passed
@thinkclay
thinkclay deleted the fix/benchmark-comment-no-color branch October 6, 2026 04:06
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