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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 01 May 2026 05:29PM 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

01 May 2026 05:29PM UTC coverage: 96.995% (+0.02%) from 96.98%
25224938021

Pull #2696

github

ericproulx
Reduce per-request allocations on the request hot path

A bundle of small, behavior-preserving cleanups that drop allocations
or chain walks from every request. Stable values (filter buckets,
versioner options, etc.) are computed once at compile/init and read via
`attr_reader`, instead of being re-resolved through nested hash lookups
on every request.

* `Endpoint#run`: precompute filter buckets (befores, before_validations,
  after_validations, afters, finallies) and `:build_params_with` once
  in `compile!`; replace the dynamic `define_method` accessor block
  with `attr_reader`; remove a dead `header 'Allow', header['Allow']`
  self-assignment.

* `Versioner::Base`: replace the two `define_method`-per-key blocks
  (top-level and `version_options` keys) with `attr_reader` plus ivars
  precomputed in `initialize`. Per-request `pattern`/`prefix`/`vendor`/
  `strict`/etc. lookups now hit attr loads. `DEFAULT_OPTIONS`,
  `attr_reader` list, and ivar assignments alphabetized; redundant
  `version_options` reader dropped.

* `Middleware::Error` / `Middleware::Formatter`: same `options[...]`
  -> `attr_reader` migration. All option keys live in `DEFAULT_OPTIONS`
  (alphabetized), assigned to ivars in `initialize`, read via attr at
  request time. Drop the dead `rescue_subclasses` middleware key (the
  per-handler `:rescue_options` hash carries it, not the middleware
  options).

* `Middleware::Base`: freeze `@options` after `merge_default_options` --
  immutable once initialized. One spec adjusted to construct a fresh
  middleware instead of mutating `subject.options[...]`.

* `ErrorFormatter::Base.call`: third argument is now the
  `rescue_options` hash directly (not the wrapping middleware options).
  Top-level `:backtrace` / `:original_exception` reads instead of
  `dig(:rescue_options, ...)`.

* `Request#make_params`: skip the `except(:version, :route_info)` hash
  allocation in the common case where routing args contain only the
  known keys.

* `Vali... (continued)
Pull Request #2696: Reduce per-request allocations on the request hot path

1077 of 1161 branches covered (92.76%)

Branch coverage included in aggregate %.

79 of 79 new or added lines in 11 files covered. (100.0%)

1 existing line in 1 file now uncovered.

3378 of 3432 relevant lines covered (98.43%)

32461.97 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
96.43
0.0% lib/grape/error_formatter/base.rb
Jobs
ID Job ID Ran Files Coverage
1 run-3.2-gemfiles/rack_3_1.gemfile - 25224938021.1 01 May 2026 05:29PM UTC 154
95.7
GitHub Action Run
2 run-4.0-gemfiles/rack_3_2.gemfile - 25224938021.2 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
3 run-3.2-gemfiles/rack_3_0.gemfile - 25224938021.3 01 May 2026 05:29PM UTC 154
95.7
GitHub Action Run
4 run-3.2-Gemfile - 25224938021.4 01 May 2026 05:30PM UTC 154
95.7
GitHub Action Run
5 run-4.0-gemfiles/grape_entity.gemfile - 25224938021.5 01 May 2026 05:29PM UTC 154
49.69
GitHub Action Run
6 run-3.4-gemfiles/rack_2_2.gemfile - 25224938021.6 01 May 2026 05:30PM UTC 154
95.64
GitHub Action Run
7 run-3.3-gemfiles/rack_2_2.gemfile - 25224938021.7 01 May 2026 05:30PM UTC 154
95.61
GitHub Action Run
8 run-4.0-gemfiles/dry_validation.gemfile - 25224938021.8 01 May 2026 05:30PM UTC 154
57.99
GitHub Action Run
9 run-3.3-gemfiles/rails_8_0.gemfile - 25224938021.9 01 May 2026 05:30PM UTC 155
95.66
GitHub Action Run
10 run-3.4-gemfiles/rails_8_0.gemfile - 25224938021.10 01 May 2026 05:30PM UTC 155
95.68
GitHub Action Run
11 run-3.2-gemfiles/rack_3_2.gemfile - 25224938021.11 01 May 2026 05:29PM UTC 154
95.7
GitHub Action Run
12 run-3.3-gemfiles/rack_3_0.gemfile - 25224938021.12 01 May 2026 05:29PM UTC 154
95.66
GitHub Action Run
13 run-3.4-Gemfile - 25224938021.13 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
14 run-3.4-gemfiles/rack_3_0.gemfile - 25224938021.14 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
15 run-3.3-gemfiles/rails_8_1.gemfile - 25224938021.15 01 May 2026 05:31PM UTC 155
95.66
GitHub Action Run
16 run-4.0-gemfiles/multi_xml.gemfile - 25224938021.16 01 May 2026 05:30PM UTC 154
35.73
GitHub Action Run
17 run-3.2-gemfiles/rails_8_1.gemfile - 25224938021.17 01 May 2026 05:30PM UTC 155
95.71
GitHub Action Run
18 run-4.0-gemfiles/rails_7_2.gemfile - 25224938021.18 01 May 2026 05:30PM UTC 155
95.68
GitHub Action Run
19 run-3.4-gemfiles/rack_3_1.gemfile - 25224938021.19 01 May 2026 05:29PM UTC 154
95.68
GitHub Action Run
20 run-3.2-gemfiles/rack_2_2.gemfile - 25224938021.20 01 May 2026 05:29PM UTC 154
95.66
GitHub Action Run
21 run-4.0-Gemfile - 25224938021.21 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
22 run-3.4-gemfiles/rails_8_1.gemfile - 25224938021.22 01 May 2026 05:29PM UTC 155
95.68
GitHub Action Run
23 run-3.3-gemfiles/rack_3_2.gemfile - 25224938021.23 01 May 2026 05:30PM UTC 154
95.66
GitHub Action Run
24 run-4.0-gemfiles/multi_json.gemfile - 25224938021.24 01 May 2026 05:30PM UTC 154
35.73
GitHub Action Run
25 run-3.4-gemfiles/rails_7_2.gemfile - 25224938021.25 01 May 2026 05:30PM UTC 155
95.68
GitHub Action Run
26 run-4.0-gemfiles/rails_8_1.gemfile - 25224938021.26 01 May 2026 05:30PM UTC 155
95.68
GitHub Action Run
27 run-4.0-gemfiles/rack_3_1.gemfile - 25224938021.27 01 May 2026 05:29PM UTC 154
95.68
GitHub Action Run
28 run-3.3-gemfiles/rack_3_1.gemfile - 25224938021.28 01 May 2026 05:29PM UTC 154
95.66
GitHub Action Run
29 run-4.0-gemfiles/rails_8_0.gemfile - 25224938021.29 01 May 2026 05:30PM UTC 155
95.68
GitHub Action Run
30 run-4.0-gemfiles/hashie.gemfile - 25224938021.30 01 May 2026 05:30PM UTC 154
62.64
GitHub Action Run
31 run-4.0-gemfiles/rack_2_2.gemfile - 25224938021.31 01 May 2026 05:30PM UTC 154
95.64
GitHub Action Run
32 run-3.3-Gemfile - 25224938021.32 01 May 2026 05:29PM UTC 154
95.66
GitHub Action Run
33 run-3.2-gemfiles/rails_7_2.gemfile - 25224938021.33 01 May 2026 05:30PM UTC 155
95.71
GitHub Action Run
34 run-3.4-gemfiles/rack_3_2.gemfile - 25224938021.34 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
35 run-4.0-gemfiles/rack_3_0.gemfile - 25224938021.35 01 May 2026 05:30PM UTC 154
95.68
GitHub Action Run
36 run-3.3-gemfiles/rails_7_2.gemfile - 25224938021.36 01 May 2026 05:30PM UTC 155
95.66
GitHub Action Run
37 run-3.2-gemfiles/rails_8_0.gemfile - 25224938021.37 01 May 2026 05:30PM UTC 155
95.71
GitHub Action Run
Source Files on build 25224938021
  • Tree
  • List 155
  • Changed 10
  • Source Changed 10
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25224938021
  • Pull Request #2696
  • PR Base - master (#25137726391)
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