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

ruby-grape / grape / 26494147065
97%

Build:
DEFAULT BRANCH: master
Ran 27 May 2026 06:11AM UTC
Jobs 38
Files 165
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

27 May 2026 06:11AM UTC coverage: 96.977% (+0.009%) from 96.968%
26494147065

push

github

web-flow
Lazy-allocate `@new_values` in `Grape::Util::BaseInheritable` (#2739)

`BaseInheritable#initialize` used to eagerly allocate an empty
`@new_values = {}` per instance. Most settings layers in a typical API
only inherit from a parent and never write any *new* values of their
own, so the empty Hash was just retained dead weight.

Defer the allocation: `@new_values` starts nil, the `[]=` writers do
`(@new_values ||= {})[name] = ...`, and the read paths in
`InheritableValues#[]` / `StackableValues#[]` short-circuit on nil so
they skip the lookup entirely instead of touching an empty Hash.
`initialize_copy` skips the `.dup` when the source has no own values.

Measured on master with a small benchmark:

  Grape::Util::InheritableSetting.new ×100
    before: 1600 objects, 183.6 kB
    after:  1200 objects, 121.1 kB   (-34%)

  parent.point_in_time_copy ×100
    before: 2500 objects, 277.3 kB
    after:  1700 objects, 152.3 kB   (-45%)

The bigger win on `point_in_time_copy` matches the
`base_inheritable.rb:27` (`new_values.dup`) hot spot in the boot-time
memory profile: that line previously dup'd four empty Hashes per copy
and now skips them entirely.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

1101 of 1187 branches covered (92.75%)

Branch coverage included in aggregate %.

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

3551 of 3610 relevant lines covered (98.37%)

31316.8 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/grape_entity.gemfile - 26494147065.1 27 May 2026 06:11AM UTC 164
50.43
GitHub Action Run
2 run-3.3-gemfiles/rack_3_2.gemfile - 26494147065.2 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
3 run-3.4-gemfiles/rails_8_0.gemfile - 26494147065.3 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
4 run-3.2-gemfiles/rails_7_2.gemfile - 26494147065.4 27 May 2026 06:11AM UTC 165
95.74
GitHub Action Run
5 run-4.0-gemfiles/rack_3_0.gemfile - 26494147065.5 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
6 run-4.0-gemfiles/rails_7_2.gemfile - 26494147065.6 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
7 run-4.0-Gemfile - 26494147065.7 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
8 run-4.0-gemfiles/rack_3_1.gemfile - 26494147065.8 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
9 run-4.0-gemfiles/multi_json.gemfile - 26494147065.9 27 May 2026 06:11AM UTC 164
36.7
GitHub Action Run
10 run-3.2-gemfiles/rails_8_0.gemfile - 26494147065.10 27 May 2026 06:11AM UTC 165
95.74
GitHub Action Run
11 run-3.3-gemfiles/rails_8_1.gemfile - 26494147065.11 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
12 run-3.4-gemfiles/rack_2_2.gemfile - 26494147065.12 27 May 2026 06:11AM UTC 164
95.65
GitHub Action Run
13 run-3.2-gemfiles/rack_3_0.gemfile - 26494147065.13 27 May 2026 06:11AM UTC 164
95.74
GitHub Action Run
14 run-4.0-gemfiles/rack_3_2.gemfile - 26494147065.14 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
15 run-3.2-gemfiles/rack_3_2.gemfile - 26494147065.15 27 May 2026 06:11AM UTC 164
95.74
GitHub Action Run
16 run-3.4-gemfiles/rack_3_0.gemfile - 26494147065.16 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
17 run-3.4-gemfiles/rack_3_1.gemfile - 26494147065.17 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
18 run-4.0-gemfiles/multi_xml.gemfile - 26494147065.18 27 May 2026 06:11AM UTC 164
36.7
GitHub Action Run
19 run-3.3-gemfiles/rack_3_1.gemfile - 26494147065.19 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
20 run-3.3-gemfiles/rails_8_0.gemfile - 26494147065.20 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
21 run-4.0-gemfiles/hashie.gemfile - 26494147065.21 27 May 2026 06:11AM UTC 164
62.59
GitHub Action Run
22 run-3.3-gemfiles/rails_7_2.gemfile - 26494147065.22 27 May 2026 06:12AM UTC 165
95.7
GitHub Action Run
23 run-4.0-gemfiles/rack_2_2.gemfile - 26494147065.23 27 May 2026 06:11AM UTC 164
95.65
GitHub Action Run
24 run-4.0-gemfiles/rails_8_0.gemfile - 26494147065.24 27 May 2026 06:12AM UTC 165
95.7
GitHub Action Run
25 run-4.0-gemfiles/rails_8_1.gemfile - 26494147065.25 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
26 run-3.4-gemfiles/rails_7_2.gemfile - 26494147065.26 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
27 run-3.3-gemfiles/rack_3_0.gemfile - 26494147065.27 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
28 run-3.4-Gemfile - 26494147065.28 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
29 run-3.4-gemfiles/rack_3_2.gemfile - 26494147065.29 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
30 run-3.2-gemfiles/rack_2_2.gemfile - 26494147065.30 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
31 run-3.4-gemfiles/rails_8_1.gemfile - 26494147065.31 27 May 2026 06:11AM UTC 165
95.7
GitHub Action Run
32 run-3.3-gemfiles/rack_2_2.gemfile - 26494147065.32 27 May 2026 06:11AM UTC 164
95.65
GitHub Action Run
33 run-3.2-gemfiles/rails_8_1.gemfile - 26494147065.33 27 May 2026 06:11AM UTC 165
95.74
GitHub Action Run
34 run-3.2-gemfiles/rack_3_1.gemfile - 26494147065.34 27 May 2026 06:11AM UTC 164
95.74
GitHub Action Run
35 run-4.0-gemfiles/dry_validation.gemfile - 26494147065.35 27 May 2026 06:11AM UTC 164
58.41
GitHub Action Run
36 run-3.3-Gemfile - 26494147065.36 27 May 2026 06:11AM UTC 164
95.7
GitHub Action Run
37 run-3.2-Gemfile - 26494147065.37 27 May 2026 06:11AM UTC 164
95.74
GitHub Action Run
38 run-4.0-gemfiles/grape_swagger.gemfile - 26494147065.38 27 May 2026 06:11AM UTC 164
55.38
GitHub Action Run
Source Files on build 26494147065
  • Tree
  • List 165
  • 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 #26494147065
  • ff888ff1 on github
  • Prev Build on master (#26493796179)
  • Next Build on master (#26494474144)
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