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

nbari / www / 42123198077
95%
master: 37%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 05 Nov 2026 10:40PM UTC
Jobs 1
Files 14
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

05 Nov 2026 10:38PM UTC coverage: 94.287% (-0.02%) from 94.303%
42123198077

push

github

nbari
Serve files without ServeDir and resolve on the runtime thread

The Go implementation at 2.0.5 outperformed this server because
net/http opens and reads files on the goroutine's own thread, while
every request here dispatched its filesystem work to spawn_blocking:
once to open, then once per 64 KiB of body through tower-http's
ServeDir and tokio::fs. A perf profile of the old binary spent 13.44%
of user CPU in the blocking pool's mutex, and the pool handoff cost
2.5 context switches per request against Go's 0.03.

Collapse the filesystem work into one resolution that also reads
bodies up to 256 KiB, build responses directly instead of through
ServeDir, and stream larger bodies in 256 KiB chunks. Resolve on the
runtime thread while the filesystem is fast, bounded by a cap of half
the workers so a filesystem that never returns cannot pin the runtime,
and fall back to the blocking pool for a second after any resolution
over 1 ms. Directory enumeration always uses the pool because its cost
grows with the entry count.

Responses stay byte-identical to the previous implementation across
442 differential checks over HTTP and HTTPS, including header order.
Three defects found while reviewing are fixed: a short inline read no
longer advertises a Content-Length it cannot satisfy, a failed
If-Range no longer turns an unsatisfiable Range into 416, and an
unrepresentable modification time drops the validators instead of
panicking the connection task, which the old code did.

Medians of three rounds, server on four CPUs sharing no physical core
with the load generator, requests/sec before -> after (Go):

  1 KiB            78,008 -> 244,695 (170,150)
  1 KiB no keepalive 21,224 -> 74,229 (28,803)
  100 KiB          39,125 ->  73,176 (41,288)
  listing          34,598 ->  43,766 (31,387)
  HEAD            129,625 -> 222,143 (185,807)
  conditional 304 130,187 -> 273,809 (198,273)
  range 206        47,340 ->  66,001 (54,331)
  4 MiB             1,660 ->   1,900 (1,9... (continued)

453 of 490 new or added lines in 3 files covered. (92.45%)

1 existing line in 1 file now uncovered.

1799 of 1908 relevant lines covered (94.29%)

468.45 hits per line

Uncovered Changes

Lines Coverage ∆ File
29
89.63
0.61% src/server/file_response.rs
8
95.32
2.21% src/server/directory.rs

Coverage Regressions

Lines Coverage ∆ File
1
89.63
0.61% src/server/file_response.rs
Jobs
ID Job ID Ran Files Coverage
1 rust - 42123198077.1 05 Nov 2026 10:40PM UTC 14
94.29
GitHub Action Run
Source Files on build 42123198077
  • Tree
  • List 14
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42123198077
  • ee04d737 on github
  • Prev Build on develop (#40643860013)
  • Next Build on develop (#42172076713)
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