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

sds / mock_redis / 16382133615 / 6
98%
main: 98%

Build:
DEFAULT BRANCH: main
Ran 18 Jul 2025 11:22PM UTC
Files 27
Run time 1s
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

18 Jul 2025 11:21PM UTC coverage: 97.681%. Remained the same
16382133615.6

push

github

web-flow
Faster hmget when fetching a lot of fields (#330)

The previous version of `hmget` calls `hget` for each field being
fetched, but that results in a lot of redundant calls to `with_hash_at`
(and in turn, `clean_up_empties_at`, which is not especially fast).

Change it to just use a single `with_hash_at` call.


```ruby
days = 1.upto(365).map(&:to_s)
redis = MockRedis.new
Benchmark.ips do |x|
  x.report("v1") { redis.hmget("views_by_year:2025", *days) }
  x.report("v2") { redis.hmget2("views_by_year:2025", *days) }
  x.compare!
end

# ruby 3.4.3 (2025-04-14 revision d0b7e5b6a0) +PRISM [arm64-darwin24]
# Warming up --------------------------------------
#                 v1    60.000 i/100ms
#                 v2   796.000 i/100ms
# Calculating -------------------------------------
#                 v1    608.372 (± 1.3%) i/s    (1.64 ms/i) -      3.060k in   5.030757s
#                 v2      8.212k (± 8.7%) i/s  (121.78 μs/i) -     41.392k in   5.087108s
# 
# Comparison:
#                 v2:     8211.7 i/s
#                 v1:      608.4 i/s - 13.50x  slower
```

1853 of 1897 relevant lines covered (97.68%)

397.53 hits per line

Source Files on job ruby3.0-6.2 - 16382133615.6
  • Tree
  • List 27
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 16382133615
  • f31e8ac8 on github
  • Prev Job for on main (#15061562434.1)
  • Next Job for on main (#16382167241.3)
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