stackprof
a sampling call-stack profiler for ruby 2.2+ (by tmm1)
MemoryProfiler
memory_profiler for ruby (by SamSaffron)
Our great sponsors
stackprof | MemoryProfiler | |
---|---|---|
6 | 6 | |
2,043 | 1,658 | |
- | - | |
5.7 | 3.4 | |
2 months ago | 11 months ago | |
Ruby | Ruby | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
stackprof
Posts with mentions or reviews of stackprof.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-11-15.
-
A Trick For Reading Flamegraphs
stackprof can be used alone/by itself to generate flamegraphs for arbitrary Ruby code.
-
Why do my requests take so much time to complete when View and ActiveRecord are finishing fast?
I’d use something like stackprof ( https://github.com/tmm1/stackprof ) to see where the time is going. If you already have suspicions you can use it to get information about a specific method / few lines of Ruby but there’s also a rack middleware.
-
Ok y’all. How can we get this kind of real-time memory profiling in Ruby? Does it already exist? Is anyone working on this?
stackprof
-
Optimizing your tests in 5 steps
Other profilers, such as stackprof, trace everything that’s happening by line. These types of profilers usually need some instrumentation to be configured, as shown below:
-
Is there a more efficient way to do these permutation calculations?
Either https://github.com/tmm1/stackprof for cpu or https://github.com/SamSaffron/memory_profiler for memory. In practice profiling and removing allocations also gives a large perf boost.
-
Automatically benchmark methods used within Rails
At first, I tried to benchmark the method using the benchmark library. (The profiler uses stackprof)
MemoryProfiler
Posts with mentions or reviews of MemoryProfiler.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-01-24.
-
Suggestions for how to reduce memory usage
Wire the memory_profiler into an around_action to identify your bloaty actions.
-
A Deep Dive into Memory Leaks in Ruby
The memory_profiler gem offers a very simple API and a detailed (albeit a little overwhelming) allocated and retained memory report — that includes the classes of objects that are allocated, their size, and where they were allocated. It's straightforward to add to our leaky program.
-
Ok y’all. How can we get this kind of real-time memory profiling in Ruby? Does it already exist? Is anyone working on this?
memory_profiler
-
Advanced ActiveRecord Querying - With Benchmarks!
We don't need to rely upon a priori reasoning only, we can use memory_profiles and benchmark_ips to compare the memory consumption and iterations per second of each solution.
-
Is there a more efficient way to do these permutation calculations?
Either https://github.com/tmm1/stackprof for cpu or https://github.com/SamSaffron/memory_profiler for memory. In practice profiling and removing allocations also gives a large perf boost.
-
Reduce memory consumption with a custom ActiveRecord attribute
Our project has one endpoint which gets called quite often. So, I profiled it with memory profiler and saw a line pointing to hstore.rb.
What are some alternatives?
When comparing stackprof and MemoryProfiler you can also consider the following projects:
rbtrace - like strace, but for ruby code
rack-mini-profiler - Profiler for your development and production Ruby rack apps.
memray - Memray is a memory profiler for Python
bullet - help to kill N+1 queries and unused eager loading
speedscope - 🔬 A fast, interactive web-based viewer for performance profiles.
Timeasure - Transparent method-level wrapper for profiling purposes in Ruby
Rbenchmarker - Automatically log benchmarks for all methods
prosopite - :mag: Rails N+1 queries auto-detection with zero false positives / false negatives
rbspy - Sampling CPU profiler for Ruby
perftools.rb - gperftools for ruby code
curses - Ruby binding for curses, ncurses, and PDCurses. Formerly part of the ruby standard library.
stackprof vs rbtrace
MemoryProfiler vs rack-mini-profiler
stackprof vs memray
MemoryProfiler vs bullet
stackprof vs speedscope
MemoryProfiler vs Timeasure
stackprof vs Rbenchmarker
MemoryProfiler vs prosopite
stackprof vs rbspy
MemoryProfiler vs perftools.rb
stackprof vs curses
MemoryProfiler vs memray