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

ruby-grape / grape / 35225244932
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dblock/automate-gem-release
DEFAULT BRANCH: master
Ran 17 Sep 2026 01:08PM UTC
Jobs 32
Files 170
Run time 2min
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

17 Sep 2026 01:08PM UTC coverage: 99.092% (-0.03%) from 99.123%
35225244932

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 sits at a different capture group in each bucket than it does in
the router's union, so a bucket carries its routes' captures renumbered for
its own union -- every capture is a fixed offset from the route's own
group, so one number shifts the whole map -- and hands them over with the
match. Reading the captures out of the match already in hand, rather than
having Mustermann match the path a second time, costs 0.28 µs and 5 objects
where the second match cost 1.48 µs and 10: on the 200-route API, +15.5%
without a JIT and +24.2% with YJIT, at 29 -> 22 allocations per request. A
route whose captures a union match cannot reproduce is matched by
Mustermann as before.

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... (continued)
Pull Request #2943: Speed up matching among many parameterized routes

1415 of 1467 branches covered (96.46%)

Branch coverage included in aggregate %.

110 of 110 new or added lines in 5 files covered. (100.0%)

4259 of 4259 relevant lines covered (100.0%)

27946.31 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/grape_swagger.gemfile - 35225244932.1 17 Sep 2026 01:08PM UTC 168
53.41
GitHub Action Run
2 run-4.0-Gemfile - 35225244932.2 17 Sep 2026 01:08PM UTC 169
97.8
GitHub Action Run
3 run-3.3-gemfiles/rack_3_1.gemfile - 35225244932.3 17 Sep 2026 01:08PM UTC 169
97.8
GitHub Action Run
4 run-4.0-gemfiles/grape_entity.gemfile - 35225244932.4 17 Sep 2026 01:08PM UTC 168
49.07
GitHub Action Run
5 run-4.0-gemfiles/rack_3_2.gemfile - 35225244932.5 17 Sep 2026 01:09PM UTC 169
97.78
GitHub Action Run
6 run-4.0-gemfiles/multi_json_1_20.gemfile - 35225244932.6 17 Sep 2026 01:09PM UTC 168
46.17
GitHub Action Run
7 run-3.4-gemfiles/rack_3_1.gemfile - 35225244932.7 17 Sep 2026 01:09PM UTC 169
97.78
GitHub Action Run
8 run-4.0-gemfiles/rails_8_1.gemfile - 35225244932.8 17 Sep 2026 01:08PM UTC 170
97.78
GitHub Action Run
9 run-4.0-gemfiles/rack_3_0.gemfile - 35225244932.9 17 Sep 2026 01:08PM UTC 169
97.78
GitHub Action Run
10 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35225244932.10 17 Sep 2026 01:08PM UTC 168
45.89
GitHub Action Run
11 run-3.4-gemfiles/rails_7_2.gemfile - 35225244932.11 17 Sep 2026 01:09PM UTC 170
97.78
GitHub Action Run
12 run-4.0-gemfiles/rack_2_2.gemfile - 35225244932.12 17 Sep 2026 01:08PM UTC 169
97.74
GitHub Action Run
13 run-4.0-gemfiles/hashie.gemfile - 35225244932.13 17 Sep 2026 01:09PM UTC 168
60.01
GitHub Action Run
14 run-4.0-gemfiles/multi_xml.gemfile - 35225244932.14 17 Sep 2026 01:09PM UTC 168
45.86
GitHub Action Run
15 run-3.3-gemfiles/rack_3_2.gemfile - 35225244932.15 17 Sep 2026 01:09PM UTC 169
97.8
GitHub Action Run
16 run-3.4-gemfiles/rails_8_1.gemfile - 35225244932.16 17 Sep 2026 01:09PM UTC 170
97.8
GitHub Action Run
17 run-3.3-gemfiles/rails_8_1.gemfile - 35225244932.17 17 Sep 2026 01:10PM UTC 170
97.8
GitHub Action Run
18 run-4.0-gemfiles/rails_8_0.gemfile - 35225244932.18 17 Sep 2026 01:09PM UTC 170
97.78
GitHub Action Run
19 run-4.0-gemfiles/rack_3_1.gemfile - 35225244932.19 17 Sep 2026 01:08PM UTC 169
97.78
GitHub Action Run
20 run-3.4-gemfiles/rack_2_2.gemfile - 35225244932.20 17 Sep 2026 01:08PM UTC 169
97.74
GitHub Action Run
21 run-3.3-gemfiles/rack_3_0.gemfile - 35225244932.21 17 Sep 2026 01:08PM UTC 169
97.8
GitHub Action Run
22 run-3.4-gemfiles/rack_3_2.gemfile - 35225244932.22 17 Sep 2026 01:09PM UTC 169
97.78
GitHub Action Run
23 run-3.4-Gemfile - 35225244932.23 17 Sep 2026 01:09PM UTC 169
97.8
GitHub Action Run
24 run-3.3-gemfiles/rack_2_2.gemfile - 35225244932.24 17 Sep 2026 01:08PM UTC 169
97.76
GitHub Action Run
25 run-3.3-gemfiles/rails_7_2.gemfile - 35225244932.25 17 Sep 2026 01:09PM UTC 170
97.8
GitHub Action Run
26 run-3.4-gemfiles/rails_8_0.gemfile - 35225244932.26 17 Sep 2026 01:09PM UTC 170
97.8
GitHub Action Run
27 run-3.3-gemfiles/rails_8_0.gemfile - 35225244932.27 17 Sep 2026 01:09PM UTC 170
97.8
GitHub Action Run
28 run-4.0-gemfiles/multi_json.gemfile - 35225244932.28 17 Sep 2026 01:09PM UTC 168
46.14
GitHub Action Run
29 run-3.4-gemfiles/rack_3_0.gemfile - 35225244932.29 17 Sep 2026 01:09PM UTC 169
97.8
GitHub Action Run
30 run-4.0-gemfiles/dry_validation.gemfile - 35225244932.30 17 Sep 2026 01:08PM UTC 168
56.27
GitHub Action Run
31 run-3.3-Gemfile - 35225244932.31 17 Sep 2026 01:09PM UTC 169
97.81
GitHub Action Run
32 run-4.0-gemfiles/rails_7_2.gemfile - 35225244932.32 17 Sep 2026 01:09PM UTC 170
97.8
GitHub Action Run
Source Files on build 35225244932
  • Tree
  • List 170
  • Changed 5
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35225244932
  • Pull Request #2943
  • PR Base - master (#35027698358)
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