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

ruby-grape / grape / 24696162603
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: perf/build-headers-each-header
DEFAULT BRANCH: master
Ran 20 Apr 2026 11:44PM UTC
Jobs 37
Files 155
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

20 Apr 2026 11:44PM UTC coverage: 96.933% (+0.002%) from 96.931%
24696162603

Pull #2691

github

ericproulx
Precompute prefix list in Versioner::Path

`Versioner::Path#before` built `[mount_path, Grape::Router.normalize_path(prefix)]`
on every request and iterated it, filtering nil/empty/'/' entries with a guard
clause on each element. Both `mount_path` and `prefix` are fixed at mount time,
so this work is redundant.

Memoize a pre-filtered `@prefixes` array in `initialize` (the middleware dup in
`Middleware::Base#call` shallow-copies ivars, so the frozen array is shared
across request dups for free). The per-request loop simplifies to
`if path_info.start_with?(path)`.

## Benchmark (1k iterations)

  current                    1.09 M i/s, 80KB / 2k objects
  variant A (memoize normalize) 1.34 M i/s, 80KB / 2k objects
  variant B (memoize list)   2.61 M i/s, 40KB / 1k objects  (2.38x faster, 2x fewer)

Shipping variant B.

No behavior change; all 2,236 specs pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2691: Precompute prefix list in Versioner::Path

1071 of 1157 branches covered (92.57%)

Branch coverage included in aggregate %.

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

3354 of 3408 relevant lines covered (98.42%)

32188.71 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.2-gemfiles/rails_7_2.gemfile - 24696162603.1 20 Apr 2026 11:44PM UTC 155
95.64
GitHub Action Run
2 run-4.0-gemfiles/rack_3_1.gemfile - 24696162603.2 20 Apr 2026 11:45PM UTC 154
95.61
GitHub Action Run
3 run-3.2-Gemfile - 24696162603.3 20 Apr 2026 11:44PM UTC 154
95.63
GitHub Action Run
4 run-4.0-gemfiles/multi_xml.gemfile - 24696162603.4 20 Apr 2026 11:45PM UTC 154
35.99
GitHub Action Run
5 run-4.0-gemfiles/rails_8_1.gemfile - 24696162603.5 20 Apr 2026 11:45PM UTC 155
95.61
GitHub Action Run
6 run-4.0-gemfiles/rack_2_2.gemfile - 24696162603.6 20 Apr 2026 11:45PM UTC 154
95.56
GitHub Action Run
7 run-3.3-gemfiles/rack_2_2.gemfile - 24696162603.7 20 Apr 2026 11:45PM UTC 154
95.54
GitHub Action Run
8 run-3.3-gemfiles/rails_8_0.gemfile - 24696162603.8 20 Apr 2026 11:44PM UTC 155
95.59
GitHub Action Run
9 run-3.2-gemfiles/rack_2_2.gemfile - 24696162603.9 20 Apr 2026 11:44PM UTC 154
95.59
GitHub Action Run
10 run-3.4-gemfiles/rails_8_0.gemfile - 24696162603.10 20 Apr 2026 11:45PM UTC 155
95.61
GitHub Action Run
11 run-3.3-gemfiles/rack_3_1.gemfile - 24696162603.11 20 Apr 2026 11:44PM UTC 154
95.59
GitHub Action Run
12 run-4.0-Gemfile - 24696162603.12 20 Apr 2026 11:44PM UTC 154
95.61
GitHub Action Run
13 run-3.4-gemfiles/rack_2_2.gemfile - 24696162603.13 20 Apr 2026 11:44PM UTC 154
95.56
GitHub Action Run
14 run-4.0-gemfiles/dry_validation.gemfile - 24696162603.14 20 Apr 2026 11:45PM UTC 154
57.77
GitHub Action Run
15 run-3.2-gemfiles/rails_8_0.gemfile - 24696162603.15 20 Apr 2026 11:45PM UTC 155
95.64
GitHub Action Run
16 run-3.3-gemfiles/rails_8_1.gemfile - 24696162603.16 20 Apr 2026 11:44PM UTC 155
95.59
GitHub Action Run
17 run-3.3-gemfiles/rails_7_2.gemfile - 24696162603.17 20 Apr 2026 11:45PM UTC 155
95.59
GitHub Action Run
18 run-3.3-gemfiles/rack_3_2.gemfile - 24696162603.18 20 Apr 2026 11:44PM UTC 154
95.59
GitHub Action Run
19 run-3.2-gemfiles/rack_3_0.gemfile - 24696162603.19 20 Apr 2026 11:44PM UTC 154
95.63
GitHub Action Run
20 run-3.4-gemfiles/rack_3_0.gemfile - 24696162603.20 20 Apr 2026 11:45PM UTC 154
95.61
GitHub Action Run
21 run-3.4-gemfiles/rails_8_1.gemfile - 24696162603.21 20 Apr 2026 11:45PM UTC 155
95.61
GitHub Action Run
22 run-3.4-Gemfile - 24696162603.22 20 Apr 2026 11:45PM UTC 154
95.61
GitHub Action Run
23 run-4.0-gemfiles/grape_entity.gemfile - 24696162603.23 20 Apr 2026 11:45PM UTC 154
49.43
GitHub Action Run
24 run-4.0-gemfiles/hashie.gemfile - 24696162603.24 20 Apr 2026 11:45PM UTC 154
62.45
GitHub Action Run
25 run-3.3-Gemfile - 24696162603.25 20 Apr 2026 11:44PM UTC 154
95.59
GitHub Action Run
26 run-3.2-gemfiles/rack_3_2.gemfile - 24696162603.26 20 Apr 2026 11:44PM UTC 154
95.63
GitHub Action Run
27 run-4.0-gemfiles/rack_3_0.gemfile - 24696162603.27 20 Apr 2026 11:44PM UTC 154
95.61
GitHub Action Run
28 run-3.4-gemfiles/rack_3_2.gemfile - 24696162603.28 20 Apr 2026 11:45PM UTC 154
95.61
GitHub Action Run
29 run-3.4-gemfiles/rails_7_2.gemfile - 24696162603.29 20 Apr 2026 11:44PM UTC 155
95.61
GitHub Action Run
30 run-4.0-gemfiles/rails_7_2.gemfile - 24696162603.30 20 Apr 2026 11:45PM UTC 155
95.61
GitHub Action Run
31 run-3.3-gemfiles/rack_3_0.gemfile - 24696162603.31 20 Apr 2026 11:44PM UTC 154
95.59
GitHub Action Run
32 run-3.2-gemfiles/rack_3_1.gemfile - 24696162603.32 20 Apr 2026 11:44PM UTC 154
95.63
GitHub Action Run
33 run-4.0-gemfiles/multi_json.gemfile - 24696162603.33 20 Apr 2026 11:45PM UTC 154
35.99
GitHub Action Run
34 run-3.4-gemfiles/rack_3_1.gemfile - 24696162603.34 20 Apr 2026 11:44PM UTC 154
95.61
GitHub Action Run
35 run-4.0-gemfiles/rails_8_0.gemfile - 24696162603.35 20 Apr 2026 11:45PM UTC 155
95.61
GitHub Action Run
36 run-4.0-gemfiles/rack_3_2.gemfile - 24696162603.36 20 Apr 2026 11:44PM UTC 154
95.61
GitHub Action Run
37 run-3.2-gemfiles/rails_8_1.gemfile - 24696162603.37 20 Apr 2026 11:44PM UTC 155
95.64
GitHub Action Run
Source Files on build 24696162603
  • Tree
  • List 155
  • 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 #24696162603
  • Pull Request #2691
  • PR Base - master (#24693877550)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc