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

ruby-grape / grape / 34777960477
99%
master: 99%

Build:
Build:
LAST BUILD BRANCH: perf/route-buckets
DEFAULT BRANCH: master
Ran 13 Sep 2026 07:32PM UTC
Jobs 32
Files 170
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

13 Sep 2026 07:31PM UTC coverage: 99.053% (-0.07%) from 99.123%
34777960477

Pull #2943

github

ericproulx
Speed up matching among many parameterized routes

A request the static table cannot answer is matched against its method's
whole union: every route's pattern, each expanding every literal character
into an alternation with its percent-encodings. On an API with 200
parameterized routes that match is most of the request -- 43-53 µs of
~68 µs without a JIT -- and it grows with every route registered ahead of
the one that matches.

A route that spells out a literal at some path segment, with only literals
and plain params ahead of it, can only match paths carrying that literal
there. Router#compile! now picks, per method, the segment position that
splits the routes best and builds one union per literal there. Each holds
the routes that literal names plus every route the segment cannot tell
apart, in registration order, so matching a request against the union for
its own segment picks the route the full union would have picked.

Paths holding a '%' (a literal may match its percent-encoding) or a newline
(the patterns end in \Z) still go through the full union, as do methods
with fewer than eight routes or with no segment that halves them. A route
matched through a bucket reads its params off its own pattern, since its
capture groups are numbered for the full union.

The buckets ride in the per-method entry #transaction already reads, so a
method without them pays no extra lookup. A bucket whose alternatives
another method already compiled -- the HEAD routes mirroring GET's --
reuses that union instead of compiling it again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pull Request #2943: Speed up matching among many parameterized routes

1411 of 1465 branches covered (96.31%)

Branch coverage included in aggregate %.

87 of 87 new or added lines in 2 files covered. (100.0%)

4238 of 4238 relevant lines covered (100.0%)

27816.16 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rack_2_2.gemfile - 34777960477.1 13 Sep 2026 07:32PM UTC 169
97.7
GitHub Action Run
2 run-3.4-Gemfile - 34777960477.2 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
3 run-3.3-gemfiles/rack_3_1.gemfile - 34777960477.3 13 Sep 2026 07:32PM UTC 169
97.77
GitHub Action Run
4 run-4.0-gemfiles/multi_json_1_20.gemfile - 34777960477.4 13 Sep 2026 07:32PM UTC 168
46.29
GitHub Action Run
5 run-3.3-gemfiles/rack_3_2.gemfile - 34777960477.5 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
6 run-3.3-gemfiles/rails_8_0.gemfile - 34777960477.6 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
7 run-4.0-gemfiles/rails_8_0.gemfile - 34777960477.7 13 Sep 2026 07:32PM UTC 170
97.74
GitHub Action Run
8 run-4.0-gemfiles/multi_xml_0_8.gemfile - 34777960477.8 13 Sep 2026 07:32PM UTC 168
46.02
GitHub Action Run
9 run-3.3-gemfiles/rack_3_0.gemfile - 34777960477.9 13 Sep 2026 07:32PM UTC 169
97.77
GitHub Action Run
10 run-4.0-gemfiles/rack_3_0.gemfile - 34777960477.10 13 Sep 2026 07:32PM UTC 169
97.74
GitHub Action Run
11 run-3.3-gemfiles/rails_7_2.gemfile - 34777960477.11 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
12 run-3.3-gemfiles/rack_2_2.gemfile - 34777960477.12 13 Sep 2026 07:32PM UTC 169
97.74
GitHub Action Run
13 run-3.4-gemfiles/rack_3_0.gemfile - 34777960477.13 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
14 run-4.0-Gemfile - 34777960477.14 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
15 run-4.0-gemfiles/rack_3_2.gemfile - 34777960477.15 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
16 run-4.0-gemfiles/multi_xml.gemfile - 34777960477.16 13 Sep 2026 07:32PM UTC 168
45.99
GitHub Action Run
17 run-4.0-gemfiles/grape_entity.gemfile - 34777960477.17 13 Sep 2026 07:32PM UTC 168
49.22
GitHub Action Run
18 run-3.3-Gemfile - 34777960477.18 13 Sep 2026 07:32PM UTC 169
97.77
GitHub Action Run
19 run-3.4-gemfiles/rails_7_2.gemfile - 34777960477.19 13 Sep 2026 07:32PM UTC 170
97.74
GitHub Action Run
20 run-4.0-gemfiles/hashie.gemfile - 34777960477.20 13 Sep 2026 07:32PM UTC 168
60.2
GitHub Action Run
21 run-3.4-gemfiles/rack_3_2.gemfile - 34777960477.21 13 Sep 2026 07:32PM UTC 169
97.74
GitHub Action Run
22 run-4.0-gemfiles/rack_3_1.gemfile - 34777960477.22 13 Sep 2026 07:32PM UTC 169
97.74
GitHub Action Run
23 run-4.0-gemfiles/dry_validation.gemfile - 34777960477.23 13 Sep 2026 07:32PM UTC 168
56.45
GitHub Action Run
24 run-3.3-gemfiles/rails_8_1.gemfile - 34777960477.24 13 Sep 2026 07:32PM UTC 170
97.77
GitHub Action Run
25 run-4.0-gemfiles/rails_8_1.gemfile - 34777960477.25 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
26 run-4.0-gemfiles/multi_json.gemfile - 34777960477.26 13 Sep 2026 07:32PM UTC 168
46.25
GitHub Action Run
27 run-4.0-gemfiles/rails_7_2.gemfile - 34777960477.27 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
28 run-3.4-gemfiles/rack_2_2.gemfile - 34777960477.28 13 Sep 2026 07:32PM UTC 169
97.72
GitHub Action Run
29 run-3.4-gemfiles/rails_8_1.gemfile - 34777960477.29 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
30 run-3.4-gemfiles/rails_8_0.gemfile - 34777960477.30 13 Sep 2026 07:32PM UTC 170
97.75
GitHub Action Run
31 run-4.0-gemfiles/grape_swagger.gemfile - 34777960477.31 13 Sep 2026 07:32PM UTC 168
53.57
GitHub Action Run
32 run-3.4-gemfiles/rack_3_1.gemfile - 34777960477.32 13 Sep 2026 07:32PM UTC 169
97.75
GitHub Action Run
Source Files on build 34777960477
  • Tree
  • List 170
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #34777960477
  • Pull Request #2943
  • PR Base - master (#34777307670)
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