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

ruby-grape / grape / 35237531125
99%

Build:
DEFAULT BRANCH: master
Ran 17 Sep 2026 03:02PM UTC
Jobs 18
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 03:01PM UTC coverage: 98.297% (-0.8%) from 99.11%
35237531125

push

github

web-flow
Speed up matching among many parameterized routes (#2943)

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... (continued)

1414 of 1478 branches covered (95.67%)

Branch coverage included in aggregate %.

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

34 existing lines in 4 files now uncovered.

4244 of 4278 relevant lines covered (99.21%)

15277.45 hits per line

Coverage Regressions

Lines Coverage ∆ File
14
30.43
-69.57% lib/grape/json.rb
11
42.31
-57.69% lib/grape/validations/validators/contract_scope_validator.rb
8
25.0
-75.0% lib/grape/validations/contract_scope.rb
1
99.72
-0.28% lib/grape/util/inheritable_setting.rb
Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/rack_3_0.gemfile - 35237531125.1 17 Sep 2026 03:02PM UTC 169
97.76
GitHub Action Run
2 run-4.0-gemfiles/rails_8_1.gemfile - 35237531125.2 17 Sep 2026 03:02PM UTC 170
97.76
GitHub Action Run
3 run-4.0-gemfiles/rack_2_2.gemfile - 35237531125.3 17 Sep 2026 03:02PM UTC 169
97.72
GitHub Action Run
4 run-4.0-gemfiles/multi_xml.gemfile - 35237531125.4 17 Sep 2026 03:02PM UTC 168
45.82
GitHub Action Run
5 run-4.0-gemfiles/hashie.gemfile - 35237531125.5 17 Sep 2026 03:02PM UTC 168
59.91
GitHub Action Run
6 run-3.3-gemfiles/rails_7_2.gemfile - 35237531125.6 17 Sep 2026 03:02PM UTC 170
97.79
GitHub Action Run
7 run-4.0-gemfiles/grape_entity.gemfile - 35237531125.7 17 Sep 2026 03:02PM UTC 168
49.02
GitHub Action Run
8 run-3.3-gemfiles/rack_3_1.gemfile - 35237531125.8 17 Sep 2026 03:02PM UTC 169
97.79
GitHub Action Run
9 run-4.0-gemfiles/rack_3_2.gemfile - 35237531125.9 17 Sep 2026 03:02PM UTC 169
97.77
GitHub Action Run
10 run-3.4-gemfiles/rack_3_0.gemfile - 35237531125.10 17 Sep 2026 03:02PM UTC 169
97.77
GitHub Action Run
11 run-3.4-gemfiles/rack_3_1.gemfile - 35237531125.11 17 Sep 2026 03:02PM UTC 169
97.77
GitHub Action Run
12 run-4.0-gemfiles/grape_swagger.gemfile - 35237531125.12 17 Sep 2026 03:02PM UTC 168
53.44
GitHub Action Run
13 run-4.0-Gemfile - 35237531125.13 17 Sep 2026 03:02PM UTC 169
97.77
GitHub Action Run
14 run-3.3-gemfiles/rack_3_2.gemfile - 35237531125.14 17 Sep 2026 03:02PM UTC 169
97.79
GitHub Action Run
15 run-4.0-gemfiles/rails_8_0.gemfile - 35237531125.15 17 Sep 2026 03:02PM UTC 170
97.76
GitHub Action Run
16 run-3.3-gemfiles/rack_3_0.gemfile - 35237531125.16 17 Sep 2026 03:02PM UTC 169
97.79
GitHub Action Run
17 run-3.4-gemfiles/rack_2_2.gemfile - 35237531125.17 17 Sep 2026 03:02PM UTC 169
97.72
GitHub Action Run
18 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35237531125.18 17 Sep 2026 03:02PM UTC 168
45.86
GitHub Action Run
Source Files on build 35237531125
  • 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 #35237531125
  • d3f47a87 on github
  • Prev Build on master (#35231135084)
  • Next Build on master (#35259919923)
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