Skip to content

Instantly share code, notes, and snippets.

@only21mil
Created November 10, 2026 16:11
Show Gist options
  • Select an option

  • Save only21mil/4a2d169caf819376998da965f3fd22bd to your computer and use it in GitHub Desktop.

Select an option

Save only21mil/4a2d169caf819376998da965f3fd22bd to your computer and use it in GitHub Desktop.
t3code #28422 live request counts

PR #28422: GitHub summary requests per PR sync, live dev servers

Measured 2026-11-10 on one Linux machine (32 cores). Text for a secret gist; it holds no paths, hosts or credentials.

Versions

Name Commit What it is
main d313b2aff31991ab94c8ac80cdc38a54dd575604 current main
this PR + main 6366fb3dd98cd14aa2478a0c71575b7c86e05336 PR head with current main merged (clean merge, not pushed)
merge base 54c5f25249961a1aa0b61932329092eadbd9d6fc main when the PR was opened
this head a79ca6246e1eeeb0f0225028e439f896ee521297 PR head

Setup

  • One real T3 server from source at a time (apps/server/src/bin.ts start), each in its own isolated T3 home. No mocks and no stubbed GitHub.
  • Fixture, made once on the PR head through the server's own command path (project.create, thread.create, then thread.pull-request.link for each PR): one synthetic project and one thread linking 110 open PRs from pingdotgg/t3code. Every run starts from a fresh copy of that state with the on-disk PR read cache removed, so all four versions read the same data.
  • Counting: a read-only fetch observer preloaded into the server process (node --import) logs each GitHub GraphQL request with its operation name, HTTP status and how many PRs its response answered. It forwards requests unchanged. Cache-step times come from the server's own trace spans: from PullRequestSyncReactor.syncGroup start to GitHubPullRequestApi.getPullRequestSummary start.
  • Flows:
    • cold sweep: the background sweep a server runs on startup (109 PRs due; one fixture PR is final).
    • loaded server: the same, with the server and three CPU-bound processes pinned to one core. Main's cache step then has a median of 12 to 16 ms and a p90 of about 340 ms, close to the 17 to 578 ms in the original report.
    • explicit refresh: after the startup sweep settles, one pullRequests.invalidate RPC per linked PR, sent at once.
  • Runs were interleaved across versions: 5 per case, 3 for the merge-base refresh.

Results: PullRequestSummary requests, median (range)

Flow main this PR + main merge base this head
cold sweep 30 (24 to 35) 6 (5 to 8) 25 (16 to 36) 5 (5 to 9)
loaded server 44 (44 to 48) 9 (5 to 11) 31 (27 to 39) 7 (5 to 8)
explicit refresh, 110 PRs 21 (20 to 25) 13 (11 to 19) 111 (111 to 111) 111 (111 to 111)

PRs per request, median: cold 3.6 / 18.2 / 4.4 / 21.8; loaded 2.5 / 12.1 / 3.5 / 15.6; refresh 5.2 / 8.5 / 1.0 / 1.0.

Cache-step median, ms: cold 1.7 / 41.5 / 2.9 / 43.3; loaded 13.1 / 266.5 / 17.0 / 297.4. With 100 reads in flight each read waits longer for its cache check, but more of them reach the 10 ms window together.

GitHub returned 502 after about 10 s for 2 merge-base cold-sweep requests, so those two runs read 84 PRs. Every other run read every due PR.

Explicit refresh on the merge base and this head

Both send one request per PR, about 0.7 s apart, over roughly 75 s. On that base, a PR cache invalidation takes every read permit, so each refreshed PR's invalidation waits for the previous PR's GitHub read to finish. #30293 (merged to main 2026-11-06) limits the invalidation to reads in its own scope stripe. With main merged, the refresh burst batches: 21 requests on main and 13 with this PR.

Per-run batch sizes

Every run's batch sizes and counts are in results.tsv, alongside this file.

flow version rep ok requests prs perRequest singles maxBatch failed launchSpanMs sweeps cacheMedian cacheP90 sizes
busy base 1 True 30 109 3.63 16 25 0 8475 1 14.2 181.6 [25, 1, 1, 3, 1, 4, 1, 6, 9, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 3, 5, 10, 1, 3, 5, 1, 5, 9]
busy base 2 True 27 109 4.04 7 25 0 7594 1 19.3 141.3 [25, 1, 3, 1, 1, 4, 1, 10, 3, 2, 4, 1, 5, 2, 3, 3, 5, 7, 2, 8, 3, 3, 1, 2, 6, 1, 2]
busy base 3 True 31 109 3.52 12 25 0 6088 1 17.0 155.4 [25, 1, 1, 3, 1, 1, 4, 5, 1, 10, 3, 1, 4, 1, 3, 3, 1, 1, 4, 3, 3, 5, 1, 1, 1, 3, 3, 5, 3, 3, 5]
busy base 4 True 34 109 3.21 12 25 0 5430 1 17.2 168.2 [25, 1, 3, 1, 1, 1, 2, 3, 4, 3, 7, 2, 1, 1, 1, 1, 2, 2, 5, 5, 1, 1, 1, 3, 4, 3, 2, 2, 2, 1, 5, 6, 5, 2]
busy base 5 True 39 109 2.79 19 22 0 6657 1 12.5 91.3 [3, 22, 1, 2, 3, 1, 1, 4, 2, 1, 1, 2, 1, 1, 3, 10, 1, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 1, 8, 3, 2, 1, 1, 1, 1, 2, 4, 5, 6]
busy head 1 True 5 109 21.8 0 25 0 4941 1 297.4 342.2 [25, 25, 9, 25, 25]
busy head 2 True 7 109 15.57 0 25 0 2968 1 247.0 290.1 [25, 25, 4, 2, 3, 25, 25]
busy head 3 True 8 109 13.62 2 25 0 2950 1 297.4 348.6 [25, 25, 25, 1, 5, 1, 2, 25]
busy head 4 True 7 109 15.57 1 25 0 2392 1 491.8 509.8 [25, 25, 1, 3, 5, 25, 25]
busy head 5 True 7 109 15.57 1 25 0 5535 1 233.6 284.9 [25, 25, 5, 3, 1, 25, 25]
busy headmain 1 True 5 109 21.8 0 25 0 3626 1 383.9 400.1 [25, 25, 25, 9, 25]
busy headmain 2 True 5 109 21.8 0 25 0 2510 1 367.4 407.9 [25, 25, 25, 25, 9]
busy headmain 3 True 11 109 9.91 3 25 0 2175 1 266.5 376.2 [3, 2, 1, 2, 1, 25, 2, 1, 22, 25, 25]
busy headmain 4 True 11 109 9.91 5 25 0 3809 1 186.1 217.4 [25, 25, 1, 2, 25, 1, 1, 1, 1, 2, 25]
busy headmain 5 True 9 109 12.11 2 25 0 1843 1 234.5 337.4 [7, 18, 2, 25, 5, 25, 1, 1, 25]
busy main 1 True 48 109 2.27 23 25 0 11507 1 13.1 165.4 [25, 1, 1, 2, 1, 2, 1, 1, 2, 3, 4, 1, 1, 2, 1, 1, 1, 3, 2, 1, 2, 2, 3, 1, 1, 1, 3, 3, 1, 1, 2, 3, 2, 1, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2, 1, 2, 4, 3]
busy main 2 True 44 109 2.48 21 25 0 7252 1 15.5 338.2 [25, 1, 1, 1, 1, 3, 1, 5, 1, 1, 2, 2, 1, 5, 1, 1, 1, 1, 3, 2, 2, 2, 4, 2, 1, 1, 2, 2, 1, 3, 2, 5, 1, 2, 2, 1, 1, 3, 2, 1, 1, 1, 2, 6]
busy main 3 True 47 109 2.32 20 25 0 9832 1 14.7 253.5 [25, 1, 1, 2, 1, 1, 2, 2, 2, 2, 1, 2, 1, 4, 2, 2, 2, 2, 2, 2, 1, 1, 3, 2, 1, 2, 2, 1, 2, 1, 1, 2, 4, 4, 1, 4, 1, 1, 1, 2, 2, 1, 1, 1, 2, 5, 1]
busy main 4 True 44 109 2.48 18 25 0 7288 1 12.0 268.2 [25, 1, 1, 1, 1, 2, 4, 2, 2, 1, 3, 3, 1, 3, 1, 1, 2, 2, 2, 2, 2, 1, 3, 1, 4, 1, 3, 2, 2, 1, 2, 1, 1, 4, 4, 1, 3, 2, 1, 4, 2, 1, 2, 1]
busy main 5 True 44 109 2.48 13 25 0 6716 1 11.7 178.2 [25, 3, 2, 2, 4, 2, 4, 1, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 4, 1, 2, 1, 1, 1, 2, 2, 2, 2, 4, 1, 2, 2, 1, 2, 2, 4, 1, 2, 1, 1, 2, 2]
cold base 1 True 22 109 4.95 7 25 0 4132 1 1.9 9.4 [25, 1, 6, 5, 2, 1, 11, 6, 2, 5, 1, 1, 6, 5, 5, 2, 1, 1, 1, 6, 11, 5]
cold base 2 True 25 109 4.36 9 25 0 5106 1 2.1 17.1 [25, 1, 1, 2, 4, 1, 1, 9, 2, 1, 4, 1, 8, 1, 1, 4, 6, 5, 8, 1, 5, 6, 5, 2, 5]
cold base 3 True 34 109 3.21 18 25 0 4803 1 3.6 18.4 [25, 1, 2, 1, 4, 1, 1, 1, 1, 1, 10, 2, 1, 4, 1, 1, 3, 1, 1, 4, 6, 2, 7, 1, 1, 3, 2, 4, 1, 1, 7, 1, 6, 1]
cold base 4 True 16 84 5.25 6 25 1 20722 1 6.7 10.5 [0, 25, 1, 3, 11, 3, 1, 10, 1, 3, 11, 1, 1, 9, 3, 1]
cold base 5 True 36 84 2.33 13 25 1 17700 1 2.9 19.0 [0, 25, 2, 2, 2, 2, 2, 2, 1, 3, 1, 1, 2, 1, 2, 3, 1, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 1, 2, 1, 1, 1, 2]
cold head 1 True 5 109 21.8 0 25 0 2511 1 42.2 45.7 [25, 25, 9, 25, 25]
cold head 2 True 9 109 12.11 3 25 0 3920 1 43.3 57.3 [25, 25, 25, 1, 1, 1, 2, 25, 4]
cold head 3 True 6 109 18.17 0 25 0 1944 1 62.7 78.3 [25, 25, 25, 4, 25, 5]
cold head 4 True 5 109 21.8 0 25 0 2106 1 40.5 44.4 [25, 25, 25, 9, 25]
cold head 5 True 5 109 21.8 0 25 0 2154 1 48.9 60.6 [25, 25, 25, 9, 25]
cold headmain 1 True 6 109 18.17 0 25 0 1758 1 41.5 44.0 [25, 25, 2, 7, 25, 25]
cold headmain 2 True 8 109 13.62 1 25 0 1863 1 44.3 57.2 [25, 25, 25, 1, 25, 3, 2, 3]
cold headmain 3 True 7 109 15.57 0 25 0 1908 1 46.0 51.7 [25, 25, 25, 2, 2, 5, 25]
cold headmain 4 True 5 109 21.8 0 25 0 1790 1 28.1 34.3 [25, 25, 9, 25, 25]
cold headmain 5 True 6 109 18.17 0 25 0 2145 1 34.9 41.1 [25, 25, 3, 6, 25, 25]
cold main 1 True 33 109 3.3 13 25 0 5626 1 2.2 29.0 [25, 2, 2, 1, 5, 1, 2, 1, 1, 3, 2, 5, 7, 1, 3, 1, 1, 2, 3, 3, 1, 2, 1, 7, 1, 3, 1, 2, 1, 7, 1, 7, 4]
cold main 2 True 26 109 4.19 4 25 0 9974 1 1.3 66.9 [25, 5, 2, 9, 2, 6, 1, 3, 5, 2, 2, 1, 2, 6, 3, 1, 2, 5, 2, 6, 6, 1, 2, 2, 3, 5]
cold main 3 True 30 109 3.63 8 25 0 9975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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2]
refresh headmain 1 True 11 110 10.0 0 18 0 2687 2 76.2 109.2 [3, 5, 6, 6, 16, 7, 18, 13, 2, 17, 17]
refresh headmain 2 True 19 110 5.79 5 17 0 2854 2 149.3 194.0 [1, 2, 1, 1, 4, 4, 1, 9, 2, 9, 10, 8, 5, 1, 3, 13, 14, 5, 17]
refresh headmain 3 True 13 110 8.46 1 20 0 3869 2 89.3 125.9 [3, 4, 3, 5, 10, 9, 15, 2, 12, 20, 7, 19, 1]
refresh headmain 4 True 13 110 8.46 0 19 0 3169 2 81.9 118.2 [3, 5, 2, 4, 16, 19, 7, 5, 8, 13, 2, 14, 12]
refresh headmain 5 True 11 110 10.0 1 25 0 5611 2 68.5 81.2 [2, 5, 6, 7, 2, 17, 25, 7, 25, 13, 1]
refresh main 1 True 25 110 4.4 6 13 0 5475 2 20.6 400.1 [2, 3, 2, 13, 4, 8, 2, 10, 1, 6, 1, 4, 2, 2, 13, 6, 1, 2, 6, 1, 1, 5, 4, 10, 1]
refresh main 2 True 21 110 5.24 4 10 0 5446 2 15.0 456.9 [1, 2, 5, 7, 10, 7, 8, 6, 5, 1, 9, 6, 6, 1, 9, 5, 6, 3, 5, 7, 1]
refresh main 3 True 21 110 5.24 0 10 0 6229 2 23.7 631.2 [3, 3, 3, 9, 7, 9, 5, 10, 8, 3, 4, 6, 6, 3, 7, 3, 3, 4, 4, 8, 2]
refresh main 4 True 21 110 5.24 3 17 0 11352 2 17.2 643.1 [1, 2, 5, 8, 17, 4, 8, 4, 8, 3, 6, 8, 2, 6, 5, 3, 6, 1, 3, 9, 1]
refresh main 5 True 20 110 5.5 4 14 0 13965 2 12.7 1424.3 [1, 2, 4, 5, 12, 3, 10, 2, 3, 8, 9, 9, 1, 1, 7, 14, 1, 5, 4, 9]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment