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

ruby-grape / grape / 33726996561
97%

Build:
DEFAULT BRANCH: master
Ran 03 Sep 2026 07:13AM UTC
Jobs 32
Files 169
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

03 Sep 2026 07:13AM UTC coverage: 96.965% (+0.03%) from 96.938%
33726996561

push

github

web-flow
Share content-type tables between middleware instances (#2885)

Grape builds one content-type-aware middleware per API instance, and each
one memoized its own derived tables. A memory profile of an app mounting 13
APIs held 42 of them (20 Formatter, 20 Error, 2 Versioner) covering four
distinct content-type registrations: 42 lookup tables and 41 mime-type
tables for four distinct values, 15.1 kB of the 849.7 kB retained.

Both tables are derived from nothing but the registry, so they now live in
value-keyed caches on Grape::ContentTypes — Hash keys compare by value, so
every API registering the same content types shares one table. On the same
app that is 42 lookup tables down to 4 and 41 mime-type tables down to 3,
17.4 kB down to 4.9 kB. What is left is the registry Hash itself, which
InheritableSetting builds fresh per API instance.

The cached tables are frozen now that they are shared, and each cache keeps
a frozen copy of the registry as its key: the caller's Hash stays reachable
through `middleware.options[:content_types]`, and mutating a live key would
corrupt a cache that is now process-wide.

Formatter is the only middleware that reads `mime_types` — Error resolves
`content_type` through the lookup, and the versioners read the registry
directly — so it warms that table itself instead of PrecomputedContentTypes
building one for all 42 instances.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

1238 of 1332 branches covered (92.94%)

Branch coverage included in aggregate %.

19 of 19 new or added lines in 3 files covered. (100.0%)

3937 of 4005 relevant lines covered (98.3%)

27115.79 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rack_2_2.gemfile - 33726996561.1 03 Sep 2026 07:14AM UTC 168
95.68
GitHub Action Run
2 run-3.3-gemfiles/rails_8_1.gemfile - 33726996561.2 03 Sep 2026 07:14AM UTC 169
95.73
GitHub Action Run
3 run-4.0-gemfiles/rack_2_2.gemfile - 33726996561.3 03 Sep 2026 07:13AM UTC 168
95.69
GitHub Action Run
4 run-3.4-gemfiles/rack_3_2.gemfile - 33726996561.4 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
5 run-4.0-gemfiles/grape_entity.gemfile - 33726996561.5 03 Sep 2026 07:13AM UTC 168
50.4
GitHub Action Run
6 run-4.0-gemfiles/rails_8_1.gemfile - 33726996561.6 03 Sep 2026 07:13AM UTC 169
95.73
GitHub Action Run
7 run-4.0-gemfiles/multi_json.gemfile - 33726996561.7 03 Sep 2026 07:13AM UTC 168
47.53
GitHub Action Run
8 run-3.4-gemfiles/rack_3_0.gemfile - 33726996561.8 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
9 run-4.0-Gemfile - 33726996561.9 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
10 run-4.0-gemfiles/rack_3_0.gemfile - 33726996561.10 03 Sep 2026 07:14AM UTC 168
95.72
GitHub Action Run
11 run-3.3-gemfiles/rack_3_1.gemfile - 33726996561.11 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
12 run-3.4-gemfiles/rails_8_1.gemfile - 33726996561.12 03 Sep 2026 07:14AM UTC 169
95.73
GitHub Action Run
13 run-3.3-gemfiles/rack_3_2.gemfile - 33726996561.13 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
14 run-4.0-gemfiles/rails_7_2.gemfile - 33726996561.14 03 Sep 2026 07:14AM UTC 169
95.73
GitHub Action Run
15 run-3.3-gemfiles/rack_3_0.gemfile - 33726996561.15 03 Sep 2026 07:14AM UTC 168
95.72
GitHub Action Run
16 run-4.0-gemfiles/rails_8_0.gemfile - 33726996561.16 03 Sep 2026 07:14AM UTC 169
95.73
GitHub Action Run
17 run-4.0-gemfiles/multi_xml_0_8.gemfile - 33726996561.17 03 Sep 2026 07:13AM UTC 168
47.03
GitHub Action Run
18 run-3.4-gemfiles/rack_2_2.gemfile - 33726996561.18 03 Sep 2026 07:14AM UTC 168
95.69
GitHub Action Run
19 run-4.0-gemfiles/grape_swagger.gemfile - 33726996561.19 03 Sep 2026 07:13AM UTC 168
55.28
GitHub Action Run
20 run-3.4-gemfiles/rails_8_0.gemfile - 33726996561.20 03 Sep 2026 07:13AM UTC 169
95.73
GitHub Action Run
21 run-4.0-gemfiles/rack_3_2.gemfile - 33726996561.21 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
22 run-3.4-gemfiles/rack_3_1.gemfile - 33726996561.22 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
23 run-3.3-Gemfile - 33726996561.23 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
24 run-4.0-gemfiles/hashie.gemfile - 33726996561.24 03 Sep 2026 07:14AM UTC 168
61.85
GitHub Action Run
25 run-4.0-gemfiles/multi_json_1_20.gemfile - 33726996561.25 03 Sep 2026 07:13AM UTC 168
47.57
GitHub Action Run
26 run-4.0-gemfiles/dry_validation.gemfile - 33726996561.26 03 Sep 2026 07:13AM UTC 168
57.83
GitHub Action Run
27 run-3.3-gemfiles/rails_7_2.gemfile - 33726996561.27 03 Sep 2026 07:13AM UTC 169
95.73
GitHub Action Run
28 run-3.4-Gemfile - 33726996561.28 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
29 run-4.0-gemfiles/rack_3_1.gemfile - 33726996561.29 03 Sep 2026 07:13AM UTC 168
95.72
GitHub Action Run
30 run-4.0-gemfiles/multi_xml.gemfile - 33726996561.30 03 Sep 2026 07:14AM UTC 168
46.99
GitHub Action Run
31 run-3.4-gemfiles/rails_7_2.gemfile - 33726996561.31 03 Sep 2026 07:14AM UTC 169
95.73
GitHub Action Run
32 run-3.3-gemfiles/rails_8_0.gemfile - 33726996561.32 03 Sep 2026 07:13AM UTC 169
95.73
GitHub Action Run
Source Files on build 33726996561
  • Tree
  • List 169
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #33726996561
  • 4689aae4 on github
  • Prev Build on master (#33726876820)
  • Next Build on master (#33728651997)
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