stackprof
curses
stackprof | curses | |
---|---|---|
6 | 4 | |
2,045 | 285 | |
- | 0.0% | |
5.7 | 2.8 | |
3 months ago | 9 days ago | |
Ruby | C | |
MIT License | GNU General Public License v3.0 or later |
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
-
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)
curses
-
CLI tools at Aha!
As we make updates to our ops and similar CLI utilities, we often improve the user experience by taking advantage of various Ruby gems. With little effort compared to low-level coding with curses, our command-line utilities that used to be cryptic and confusing are now interactive, easy to use, and — dare I say — elegant.
-
Ncurses in Ruby style?
https://github.com/ruby/curses is the official ncurses gem for ruby
-
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?
As a follow up, if anyone is interested in working on something like this, Ruby has an official curses gem supporting the curses family of libraries.
-
Parallel progress output from different threads
First, a word of caution. "Updating" a terminal or console is possible, but it is rife with gotchas and inconsistencies. The go to library/application for this type of interfaces is Curses. There are Ruby bindings, but this injects a system dependency that may or may not be available on a given platform. Also, Curses is way overkill if all you're doing is output.
What are some alternatives?
rbtrace - like strace, but for ruby code
cpaint - https://briancallahan.net/blog/20220220.html
memray - Memray is a memory profiler for Python
posix - POSIX/C bindings generator for the Crystal programming language
speedscope - 🔬 A fast, interactive web-based viewer for performance profiles.
PDCurses - A curses library for environments that don't fit the termcap/terminfo model.
MemoryProfiler - memory_profiler for ruby
newt - Mirror of https://pagure.io/newt.git
rbspy - Sampling CPU profiler for Ruby
vifm - Vifm is a file manager with curses interface, which provides Vim-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Rbenchmarker - Automatically log benchmarks for all methods
reline - The compatible library with the API of Ruby's stdlib 'readline'