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

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

Build:
Build:
LAST BUILD BRANCH: robust_mounted_app_comparison
DEFAULT BRANCH: master
Ran 26 May 2026 06:53PM UTC
Jobs 38
Files 164
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

26 May 2026 06:50PM UTC coverage: 97.001% (+0.003%) from 96.998%
26468366305

Pull #2740

github

ericproulx
Lazy-allocate `@api_class` and `@point_in_time_copies` on InheritableSetting

`InheritableSetting#initialize` used to eagerly allocate both fields up
front. Neither is touched on most settings layers:

- `@api_class` is only written by external code (e.g. plugins) via
  `setting.api_class[:k] = v`; nothing in `lib/` writes to it.
- `@point_in_time_copies` only fills up on settings that get cloned via
  `point_in_time_copy` — typically the API-class-level setting, not the
  per-endpoint copies that make up the bulk of allocations at boot.

Switch both to memoizing readers (`@x ||= …`), drop the eager init, and
rewrite the `inherit_from` propagation loop to access the ivar directly
with `&.each` so the no-copies path doesn't allocate the Array just to
iterate zero elements.

Measured against master:

  Grape::Util::InheritableSetting.new × 100
    before: 1600 objects, 183.6 kB
    after:  1400 objects, 164.1 kB   (-11%)

Stacks with #2739 (lazy `@new_values`) for compounded boot-time savings.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2740: Lazy-allocate @api_class and @point_in_time_copies on InheritableSetting

1089 of 1173 branches covered (92.84%)

Branch coverage included in aggregate %.

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

3536 of 3595 relevant lines covered (98.36%)

31555.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-3.3-gemfiles/rails_7_2.gemfile - 26468366305.1 26 May 2026 06:53PM UTC 164
95.72
GitHub Action Run
2 run-4.0-gemfiles/rack_3_2.gemfile - 26468366305.2 26 May 2026 06:54PM UTC 163
95.71
GitHub Action Run
3 run-4.0-gemfiles/rack_3_0.gemfile - 26468366305.3 26 May 2026 06:54PM UTC 163
95.71
GitHub Action Run
4 run-4.0-gemfiles/rack_2_2.gemfile - 26468366305.4 26 May 2026 06:55PM UTC 163
95.67
GitHub Action Run
5 run-3.3-gemfiles/rack_3_0.gemfile - 26468366305.5 26 May 2026 06:54PM UTC 163
95.71
GitHub Action Run
6 run-3.4-Gemfile - 26468366305.6 26 May 2026 06:57PM UTC 163
95.71
GitHub Action Run
7 run-3.4-gemfiles/rack_3_0.gemfile - 26468366305.7 26 May 2026 06:55PM UTC 163
95.71
GitHub Action Run
8 run-3.3-gemfiles/rails_8_1.gemfile - 26468366305.8 26 May 2026 06:57PM UTC 164
95.72
GitHub Action Run
9 run-3.4-gemfiles/rails_7_2.gemfile - 26468366305.9 26 May 2026 06:54PM UTC 164
95.72
GitHub Action Run
10 run-3.2-gemfiles/rails_8_0.gemfile - 26468366305.10 26 May 2026 06:56PM UTC 164
95.76
GitHub Action Run
11 run-4.0-gemfiles/rails_8_0.gemfile - 26468366305.11 26 May 2026 06:57PM UTC 164
95.72
GitHub Action Run
12 run-3.2-gemfiles/rails_8_1.gemfile - 26468366305.12 26 May 2026 06:57PM UTC 164
95.76
GitHub Action Run
13 run-4.0-gemfiles/multi_json.gemfile - 26468366305.13 26 May 2026 06:54PM UTC 163
36.74
GitHub Action Run
14 run-3.4-gemfiles/rack_3_2.gemfile - 26468366305.14 26 May 2026 06:57PM UTC 163
95.71
GitHub Action Run
15 run-3.2-gemfiles/rails_7_2.gemfile - 26468366305.15 26 May 2026 06:57PM UTC 164
95.76
GitHub Action Run
16 run-4.0-gemfiles/multi_xml.gemfile - 26468366305.16 26 May 2026 06:56PM UTC 163
36.74
GitHub Action Run
17 run-3.4-gemfiles/rails_8_0.gemfile - 26468366305.17 26 May 2026 06:57PM UTC 164
95.72
GitHub Action Run
18 run-3.3-Gemfile - 26468366305.18 26 May 2026 06:55PM UTC 163
95.71
GitHub Action Run
19 run-3.4-gemfiles/rack_3_1.gemfile - 26468366305.19 26 May 2026 06:55PM UTC 163
95.71
GitHub Action Run
20 run-3.3-gemfiles/rack_3_2.gemfile - 26468366305.20 26 May 2026 06:53PM UTC 163
95.71
GitHub Action Run
21 run-3.3-gemfiles/rack_3_1.gemfile - 26468366305.21 26 May 2026 06:56PM UTC 163
95.71
GitHub Action Run
22 run-4.0-Gemfile - 26468366305.22 26 May 2026 06:54PM UTC 163
95.71
GitHub Action Run
23 run-3.2-gemfiles/rack_3_1.gemfile - 26468366305.23 26 May 2026 06:55PM UTC 163
95.76
GitHub Action Run
24 run-3.2-gemfiles/rack_2_2.gemfile - 26468366305.24 26 May 2026 06:57PM UTC 163
95.71
GitHub Action Run
25 run-3.2-gemfiles/rack_3_0.gemfile - 26468366305.25 26 May 2026 06:53PM UTC 163
95.76
GitHub Action Run
26 run-3.2-Gemfile - 26468366305.26 26 May 2026 06:53PM UTC 163
95.76
GitHub Action Run
27 run-4.0-gemfiles/grape_entity.gemfile - 26468366305.27 26 May 2026 06:54PM UTC 163
50.29
GitHub Action Run
28 run-3.3-gemfiles/rack_2_2.gemfile - 26468366305.28 26 May 2026 06:53PM UTC 163
95.67
GitHub Action Run
29 run-4.0-gemfiles/rack_3_1.gemfile - 26468366305.29 26 May 2026 06:55PM UTC 163
95.71
GitHub Action Run
30 run-4.0-gemfiles/rails_8_1.gemfile - 26468366305.30 26 May 2026 06:55PM UTC 164
95.72
GitHub Action Run
31 run-3.4-gemfiles/rails_8_1.gemfile - 26468366305.31 26 May 2026 06:54PM UTC 164
95.72
GitHub Action Run
32 run-3.2-gemfiles/rack_3_2.gemfile - 26468366305.32 26 May 2026 06:55PM UTC 163
95.76
GitHub Action Run
33 run-4.0-gemfiles/dry_validation.gemfile - 26468366305.33 26 May 2026 06:54PM UTC 163
58.3
GitHub Action Run
34 run-3.4-gemfiles/rack_2_2.gemfile - 26468366305.34 26 May 2026 06:56PM UTC 163
95.67
GitHub Action Run
35 run-4.0-gemfiles/grape_swagger.gemfile - 26468366305.35 26 May 2026 06:55PM UTC 163
55.25
GitHub Action Run
36 run-4.0-gemfiles/hashie.gemfile - 26468366305.36 26 May 2026 06:55PM UTC 163
62.51
GitHub Action Run
37 run-3.3-gemfiles/rails_8_0.gemfile - 26468366305.37 26 May 2026 06:55PM UTC 164
95.72
GitHub Action Run
38 run-4.0-gemfiles/rails_7_2.gemfile - 26468366305.38 26 May 2026 06:57PM UTC 164
95.72
GitHub Action Run
Source Files on build 26468366305
  • Tree
  • List 164
  • 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 #26468366305
  • Pull Request #2740
  • PR Base - master (#26418525997)
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