HeapScope

Ruby · MRI 3.1+ · Local-only · No SaaS

When memory grows,
know why.

Evidence-driven diagnostics for object retention, heap growth, and leak-shaped patterns in long-running Ruby processes — without claiming a leak unless the evidence is strong.

Gem version Available on RubyGems · gem install heapscope

gem install heapscope
heapscope about
heapscope doctor

Built for retention, not just RSS

Snapshots, multi-cycle experiments, allocation sites, thread-locals, and CI budgets — all offline.

Retention experiments

Force-GC cycles, survival ratios, and growth patterns that separate churn from sticky populations.

Evidence-first findings

HS001–HS010 diagnostics separate facts, derived behavior, hypotheses, and suspected causes.

Rails & Sidekiq ready

Optional middleware and matchers without pulling frameworks into the core gem.

Privacy by design

No network, no telemetry, no object-value dumps by default. Reports stay on your machine.

Budgets & next steps

CI presets (rails_request, sidekiq_job, ci_strict) plus ranked follow-ups on every report.

Watch alerts

heapscope watch samples RSS and live slots and flags spike anomalies — still fully local.

Install from RubyGems

Get the release on rubygems.org/gems/heapscope. Source and release notes live on GitHub Releases.

# Install
gem install heapscope

# Or Gemfile
gem "heapscope", "~> 0.6"
require "heapscope"

HeapScope.probe(title: "import") do
  ImportJob.perform_now
end

Documentation