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

ruby-grape / grape / 35274722362
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: benchmark/grape-on-rack
DEFAULT BRANCH: master
Ran 17 Sep 2026 09:06PM UTC
Jobs 32
Files 167
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

17 Sep 2026 09:05PM UTC coverage: 99.042% (-0.005%) from 99.047%
35274722362

push

github

ericproulx
Collapse the lazy configuration value tree into one path-based Value

A remountable API reads `configuration` while its own class body runs,
long before anybody mounts it and supplies one, so the read has to be
recorded and replayed once per mount.

To remember what had been read, `Grape::Util::Lazy` eagerly mirrored the
whole `with:` Hash as a tree of wrapper objects, and `[]` mutated the
child it returned, stamping it with the path it was reached by before
handing back that shared node. Reading was writing, and it was only safe
because every read re-stamped the path.

The tree carried its own weight in oddities: `@value_hash` held an Array
in `ValueArray`, `@value` was dead in both enumerables (`super` set it,
both override `evaluate`), and the whole structure existed so that
`evaluate` could answer a deep `HashWithIndifferentAccess` - which is
what `Hash#with_indifferent_access` already answers, identically, down to
the classes at every depth.

A read is now one immutable `Lazy::Value` holding the configuration and
the path of keys walked into it. `[]` answers a fresh Value one key
deeper, `evaluate` walks the path, and `evaluate_from` walks that same
path through the configuration a mount supplied. `ValueHash`,
`ValueArray` and `ValueEnumerable` are deleted, and
`EndpointConfiguration` carries the single conversion.

This fixes nested configuration reads. `configuration[:db][:host]`
raised `NoMethodError` while the class body ran, because a key missing
from a base instance's empty configuration yielded a plain `Value`,
which had no `[]`. Reading a key nested in a Hash or an Array was
impossible in a remountable API.

Building a configuration is 1.5x faster, and `evaluate` - which runs per
request through `configuration` inside an endpoint - is 13x faster
(1.79 us to 136 ns).

The old specs asserted which wrapper class `[]` answered, so they are
replaced by specs on what a read answers. Two properties the tree
provided incidentally are now pinned: ... (continued)

1424 of 1479 branches covered (96.28%)

Branch coverage included in aggregate %.

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

4260 of 4260 relevant lines covered (100.0%)

28367.26 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-4.0-gemfiles/multi_json.gemfile - 35274722362.1 17 Sep 2026 09:06PM UTC 165
46.08
GitHub Action Run
2 run-3.3-gemfiles/rack_3_1.gemfile - 35274722362.2 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
3 run-3.4-gemfiles/rack_3_0.gemfile - 35274722362.3 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
4 run-3.3-Gemfile - 35274722362.4 17 Sep 2026 09:06PM UTC 166
97.87
GitHub Action Run
5 run-3.3-gemfiles/rails_8_0.gemfile - 35274722362.5 17 Sep 2026 09:06PM UTC 167
97.87
GitHub Action Run
6 run-4.0-gemfiles/rails_8_0.gemfile - 35274722362.6 17 Sep 2026 09:06PM UTC 167
97.84
GitHub Action Run
7 run-4.0-gemfiles/dry_validation.gemfile - 35274722362.7 17 Sep 2026 09:06PM UTC 165
56.23
GitHub Action Run
8 run-3.3-gemfiles/rack_3_0.gemfile - 35274722362.8 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
9 run-4.0-gemfiles/multi_xml_0_8.gemfile - 35274722362.9 17 Sep 2026 09:06PM UTC 165
45.84
GitHub Action Run
10 run-3.4-Gemfile - 35274722362.10 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
11 run-4.0-gemfiles/multi_xml.gemfile - 35274722362.11 17 Sep 2026 09:06PM UTC 165
45.8
GitHub Action Run
12 run-3.3-gemfiles/rails_7_2.gemfile - 35274722362.12 17 Sep 2026 09:06PM UTC 167
97.87
GitHub Action Run
13 run-4.0-gemfiles/hashie.gemfile - 35274722362.13 17 Sep 2026 09:06PM UTC 165
59.98
GitHub Action Run
14 run-3.4-gemfiles/rack_3_1.gemfile - 35274722362.14 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
15 run-3.4-gemfiles/rails_8_0.gemfile - 35274722362.15 17 Sep 2026 09:06PM UTC 167
97.86
GitHub Action Run
16 run-4.0-gemfiles/multi_json_1_20.gemfile - 35274722362.16 17 Sep 2026 09:06PM UTC 165
46.12
GitHub Action Run
17 run-4.0-gemfiles/rails_8_1.gemfile - 35274722362.17 17 Sep 2026 09:06PM UTC 167
97.86
GitHub Action Run
18 run-3.4-gemfiles/rack_2_2.gemfile - 35274722362.18 17 Sep 2026 09:06PM UTC 166
97.82
GitHub Action Run
19 run-3.3-gemfiles/rack_2_2.gemfile - 35274722362.19 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
20 run-4.0-gemfiles/rack_3_0.gemfile - 35274722362.20 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
21 run-3.4-gemfiles/rails_7_2.gemfile - 35274722362.21 17 Sep 2026 09:06PM UTC 167
97.84
GitHub Action Run
22 run-3.4-gemfiles/rails_8_1.gemfile - 35274722362.22 17 Sep 2026 09:06PM UTC 167
97.86
GitHub Action Run
23 run-4.0-gemfiles/rack_3_1.gemfile - 35274722362.23 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
24 run-4.0-gemfiles/grape_entity.gemfile - 35274722362.24 17 Sep 2026 09:06PM UTC 165
49.05
GitHub Action Run
25 run-4.0-gemfiles/rack_3_2.gemfile - 35274722362.25 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
26 run-4.0-Gemfile - 35274722362.26 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
27 run-3.4-gemfiles/rack_3_2.gemfile - 35274722362.27 17 Sep 2026 09:06PM UTC 166
97.84
GitHub Action Run
28 run-4.0-gemfiles/grape_swagger.gemfile - 35274722362.28 17 Sep 2026 09:06PM UTC 165
53.44
GitHub Action Run
29 run-3.3-gemfiles/rack_3_2.gemfile - 35274722362.29 17 Sep 2026 09:06PM UTC 166
97.85
GitHub Action Run
30 run-4.0-gemfiles/rack_2_2.gemfile - 35274722362.30 17 Sep 2026 09:06PM UTC 166
97.8
GitHub Action Run
31 run-4.0-gemfiles/rails_7_2.gemfile - 35274722362.31 17 Sep 2026 09:06PM UTC 167
97.84
GitHub Action Run
32 run-3.3-gemfiles/rails_8_1.gemfile - 35274722362.32 17 Sep 2026 09:06PM UTC 167
97.87
GitHub Action Run
Source Files on build 35274722362
  • Tree
  • List 167
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35274722362
  • b7093c9a on github
  • Prev Build on master (#35270042511)
  • Next Build on collapse-lazy-value-tree (#35274783394)
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