Stage 04 · Run · Researched comparison
Best Ruby Profilers for Rails and Plain Ruby in 2026
rack-mini-profiler is the first pick for most Rails developers because it shows request timings in the browser during development. For CPU profiling of a running process, stackprof is a common choice, and Vernier is a newer sampling profiler that targets modern Ruby versions. rbspy profiles a running Ruby process from outside, which helps when you cannot add a gem.
By Shihab Mia
Published 28 Nov 2026 · 7 tools compared
We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.
Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.
Key takeaways
- rack-mini-profiler is free and open source and adds a timing panel to Rails pages in development.
- stackprof and Vernier are sampling profilers; stackprof is wall-clock and CPU, Vernier targets Ruby 3.2 and later.
- rbspy profiles a live process without changing its code, but it does not cover memory allocation.
- All seven tools here are free and open source, so cost is not the deciding factor.
Who each pick is for
- Rails developers who want per-request timings in the browserrack-mini-profiler
- Developers who need CPU and wall-clock samples of Ruby codestackprof
- Developers on newer Ruby versions who want a sampling profilerVernier
- Developers who want call graphs and method-level reportsruby-prof
- Developers tracking down memory allocation and retentionmemory_profiler
- Profiling a running Ruby process without changing its coderbspy
- Rails teams checking boot time, memory and gem load costderailed_benchmarks
Comparison
| Tool | Best for | Standout feature | Listed starting price | Free plan or trial |
|---|---|---|---|---|
| 1rack-mini-profiler | Rails developers who want per-request timings in the browser | Shows request timings in the page | Free (open source) | Free plan |
| 2stackprof | Developers who need CPU and wall-clock samples of Ruby code | Low overhead sampling | Free (open source) | Free plan |
| 3Vernier | Developers on newer Ruby versions who want a sampling profiler | Built for modern Ruby | Free (open source) | Free plan |
| 4ruby-prof | Developers who want call graphs and method-level reports | Detailed call graphs | Free (open source) | Free plan |
| 5memory_profiler | Developers tracking down memory allocation and retention | Reports allocated and retained objects by location | Free (open source) | Free plan |
| 6rbspy | Profiling a running Ruby process without changing its code | Attaches to a live process | Free (open source) | Free plan |
| 7derailed_benchmarks | Rails teams checking boot time, memory and gem load cost | Benchmarks boot and memory | Free (open source) | Free plan |
How we picked
We picked tools that are currently maintained and that do a distinct profiling job for Ruby or Rails. Criteria were fit for the task, supported platforms and Ruby versions, licence and cost, and the main limits stated in each project's documentation. Sources are vendor pages, README files and project repositories. Prices and version support change, so confirm details on the project page before you commit.
The tools, one by one
rack-mini-profiler
Best for rails developers who want per-request timings in the browser

What it is and where it fits
rack-mini-profiler is Rack middleware that adds a small timing badge to pages in development. It reports total request time and can show SQL queries, Redis calls and memory allocations depending on which optional gems are installed. It runs wherever Rack runs, so Rails and other Rack apps are supported.
Setup is a gem in the development group plus a middleware line. It is not a sampling profiler, so it tells you where time went at the request level rather than inside a single method. For method-level detail, pair it with stackprof or Vernier. Skip it if you need to profile a non-Rack process or a background job.
Standout: Shows request timings in the page
Free (open source), as listed by the vendor (rack-mini-profiler website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Shows request timings in the page
- can break down SQL and memory
Drawbacks
- Aimed at development, not production load testing
- Rails-focused
Skip it if this limit matters to you: aimed at development, not production load testing.
Verdict. A sensible pick for rails developers who want per-request timings in the browser.
stackprof
Best for developers who need CPU and wall-clock samples of Ruby code

What it is and where it fits
stackprof is a sampling profiler written as a C extension. It samples the call stack at a set interval and records CPU time or wall-clock time. You wrap the code you want to measure in a block and get a dump file, which you can read with the bundled command-line tool or load into a viewer.
It works on MRI and is widely used in gems and CI scripts because overhead is low. It does not profile memory allocations on its own, and it will not help with a process you cannot modify. Use it when you can add a gem and wrap the suspect code.
Standout: Low overhead sampling
Free (open source), as listed by the vendor (stackprof website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Low overhead sampling
- outputs data other tools can read
Drawbacks
- Needs code changes or a wrapper
- output is not a visual report by default
Skip it if this limit matters to you: needs code changes or a wrapper.
Verdict. A sensible pick for developers who need CPU and wall-clock samples of Ruby code.
Alternatives in this guide: rack-mini-profiler, Vernier, ruby-prof
Vernier
Best for developers on newer Ruby versions who want a sampling profiler

What it is and where it fits
Vernier is a sampling profiler for Ruby that targets recent Ruby releases, including the GVL and garbage collector activity. It records samples and writes output that tools like Firefox Profiler can open, which makes the timeline easier to read than a raw dump.
It is a newer project, so check the README for the supported Ruby versions before you add it. It is a good fit if you are already on a current Ruby and want a profiler that understands threads and GC. If you are on an older Ruby, stackprof is the safer pick.
Standout: Built for modern Ruby
Free (open source), as listed by the vendor (Vernier website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Built for modern Ruby
- produces profiles viewable in common tools
Drawbacks
- Requires a recent Ruby version
- newer and less widely adopted
Skip it if this limit matters to you: requires a recent Ruby version.
Verdict. A sensible pick for developers on newer Ruby versions who want a sampling profiler.
Alternatives in this guide: rack-mini-profiler, stackprof, ruby-prof
ruby-prof
Best for developers who want call graphs and method-level reports

What it is and where it fits
ruby-prof is a C extension that profiles method calls and can produce flat reports, call graphs and call trees. It supports wall time, CPU time and memory modes, and it can print to text, HTML or callgrind format for viewing in other tools.
Because it instruments calls rather than sampling, overhead is higher than stackprof, so it suits short runs and focused tests rather than long requests. It works on MRI. Use it when you need a call graph and can accept slower execution during the profile.
Standout: Detailed call graphs
Free (open source), as listed by the vendor (ruby-prof website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Detailed call graphs
- several output formats
Drawbacks
- Higher overhead than sampling
- setup takes more code
Skip it if this limit matters to you: higher overhead than sampling.
Verdict. A sensible pick for developers who want call graphs and method-level reports.
Alternatives in this guide: rack-mini-profiler, stackprof, Vernier
memory_profiler
Best for developers tracking down memory allocation and retention

What it is and where it fits
memory_profiler answers a different question from CPU profilers: which lines allocate objects and which keep them alive. You wrap a block, and it reports allocation counts and retained memory grouped by file and line, plus a list of the largest strings and objects.
It runs on MRI and is often used with a test or a script that reproduces the problem. It does not measure CPU time, so pair it with stackprof or Vernier when you need both views. It is the right tool when memory growth, not speed, is the issue.
Standout: Reports allocated and retained objects by location
Free (open source), as listed by the vendor (memory_profiler website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Reports allocated and retained objects by location
- simple report format
Drawbacks
- Focused on memory only
- not a CPU profiler
Skip it if this limit matters to you: focused on memory only.
Verdict. A sensible pick for developers tracking down memory allocation and retention.
Alternatives in this guide: rack-mini-profiler, stackprof, Vernier
rbspy
Best for profiling a running Ruby process without changing its code

What it is and where it fits
rbspy is a sampling profiler written in Rust that attaches to a running Ruby process and records stack samples. You run it from the command line against a process ID and get a flame graph or a summary. Because it works from outside, you can profile a process you did not start with profiling in mind.
It runs on Linux and macOS. It needs permission to read the target process memory, which may be limited in containers or on shared hosts. It profiles CPU time, not allocations, so use memory_profiler when the problem is memory.
Standout: Attaches to a live process
Free (open source), as listed by the vendor (rbspy website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Attaches to a live process
- no gem or code change needed
Drawbacks
- Does not profile memory
- needs permission to read the process
Skip it if this limit matters to you: does not profile memory.
Verdict. A sensible pick for profiling a running Ruby process without changing its code.
Alternatives in this guide: rack-mini-profiler, stackprof, Vernier
derailed_benchmarks
Best for rails teams checking boot time, memory and gem load cost

What it is and where it fits
derailed_benchmarks is a set of Rake tasks for Rails apps. It measures boot time, memory use per request and the cost of loading each gem, and it can check for memory leaks across requests. It is aimed at the questions you ask before a deploy rather than during a single request.
It is a Rails tool, so it does not apply to plain Ruby scripts or non-Rails frameworks. Use it alongside rack-mini-profiler: derailed_benchmarks for the app-wide picture and rack-mini-profiler for a specific slow page.
Standout: Benchmarks boot and memory
Free (open source), as listed by the vendor (derailed_benchmarks website). Confirm the current plan price before you buy.
Free plan. Plans change, so confirm on the vendor's pricing page before you buy.
Benefits
- Benchmarks boot and memory
- checks gem load impact
Drawbacks
- Rails-specific
- not a per-request profiler
Skip it if this limit matters to you: rails-specific.
Verdict. A sensible pick for rails teams checking boot time, memory and gem load cost.
Alternatives in this guide: rack-mini-profiler, stackprof, Vernier
Who should use what
If you are debugging a slow Rails page in development, start with rack-mini-profiler and add stackprof or Vernier for method detail. If you need to profile a production process you cannot restart, use rbspy. If memory growth is the problem, use memory_profiler, and if you are preparing a deploy and want boot and gem costs, use derailed_benchmarks. Teams that need call graphs for a short run can reach for ruby-prof.
Questions to settle before you buy
What to check before you buy
- Confirm the tool supports your Ruby version; Vernier needs a recent release.
- Check whether it profiles CPU, wall time or memory, and pick the one that matches your question.
- Decide if you can change code or need an external profiler like rbspy.
- Read the overhead notes; instrumenting profilers slow execution more than samplers.
- Check the licence and whether the project is still maintained.
FAQ
What is the difference between a sampling and an instrumenting profiler?
A sampling profiler records the call stack at intervals and has lower overhead. An instrumenting profiler like ruby-prof hooks every call, which gives more detail but slows the program more. Use sampling for long or production-like runs and instrumenting for short, focused ones.
Can I profile a running Ruby process without changing its code?
Yes. rbspy attaches to a live process from the command line and records samples. It needs permission to read the process memory, which can be restricted in containers. It profiles CPU time, not memory allocations.
Which tool should I use for memory problems?
memory_profiler reports allocated and retained objects by file and line. derailed_benchmarks can check for leaks across requests in a Rails app. CPU profilers like stackprof will not show you where memory is retained.
Do these tools work outside Rails?
stackprof, Vernier, ruby-prof, memory_profiler and rbspy work with plain Ruby. rack-mini-profiler needs a Rack app. derailed_benchmarks is Rails-specific and will not apply to other frameworks.
Are any of these tools paid?
All seven tools listed here are free and open source. Cost is not a factor in choosing between them; pick based on the question you need to answer and your Ruby version.
Sources we checked
Method: how we score · editorial policy.
Change log. First published 28 Nov 2026.