• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Kikobeats / router-http / 40591568377
99%

Build:
DEFAULT BRANCH: master
Ran 27 Oct 2026 10:02PM UTC
Jobs 1
Files 1
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Oct 2026 10:01PM UTC coverage: 98.929% (+0.2%) from 98.755%
40591568377

push

github

web-flow
perf(dispatch): keep per-request loop state in one object (#45)

* perf(dispatch): keep per-request loop state in one object

Every request allocated a closure context holding ~20 mutable slots plus
three closures (leaveFrame, handleNext, executeLoop). The loop functions now
live once per router and take a Dispatch instance; a request allocates that
object and a single `next` callback. GC self time in a 3M-request profile
went from 159ms to 30ms.

Dispatch is a class rather than an object literal: as a literal, V8's
allocation-site pretenuring flip-flopped and deoptimized the request path
repeatedly (228ns vs 102ns per request).

A/B, benchmark/index.js, 8 alternating runs per side, median of medians (ms
per 1M requests), node v24.16.0 arm64, load1 12.8-21.4:

| case | base | change | delta |
|---|---|---|---|
| static route | 62.2 | 49.4 | -20.6% |
| param route | 121.3 | 110.1 | -9.2% |
| param route 2 middlewares | 148.0 | 139.9 | -5.5% |
| not found | 80.3 | 73.6 | -8.3% |
| control raw find-my-way | 82.9 | 82.1 | -1.0% |

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(dispatch): lock branches the loop move left untested

Removing the slash restore, the sync yield, the frameEntered guards, or
the null check left the suite green. Those inputs now fail if the check
is dropped. The path-prefix clamp is gone because substring already
stops at the end of the path.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

209 of 214 branches covered (97.66%)

Branch coverage included in aggregate %.

213 of 213 new or added lines in 1 file covered. (100.0%)

622 of 626 relevant lines covered (99.36%)

2630.38 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40591568377.1 27 Oct 2026 10:02PM UTC 1
98.93
GitHub Action Run
Source Files on build 40591568377
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40591568377
  • f9a0dc38 on github
  • Prev Build on master (#38529264765)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc