stackprof
rails_panel
Our great sponsors
stackprof | rails_panel | |
---|---|---|
6 | 3 | |
2,043 | 3,829 | |
- | - | |
5.7 | 0.0 | |
2 months ago | 12 days ago | |
Ruby | Ruby | |
MIT License | MIT License |
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)
rails_panel
-
RoR Debugbar
This seems pretty similar to https://github.com/dejan/rails_panel. Was that your inspiration?
-
Why do my requests take so much time to complete when View and ActiveRecord are finishing fast?
There's a few things that could be happening. I recommend trying out https://github.com/dejan/rails_panel. It gives you a better break down if exactly what's taking time. You also might look at how long it takes to actually instantiate your models. The actual query time is usually the slowest operation, but if you have a bunch of models on the page just the classes being loaded can take a good amount of time
-
Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
Love seeing the set of gems that folks tend to bring into all their projects. https://github.com/dejan/rails_panel Was a new one for me, will def be checking that out
What are some alternatives?
rbtrace - like strace, but for ruby code
vite_ruby - ⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience
memray - Memray is a memory profiler for Python
docker-rails-example - A production ready example Rails app that's using Docker and Docker Compose.
speedscope - 🔬 A fast, interactive web-based viewer for performance profiles.
importmap-rails - Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling.
MemoryProfiler - memory_profiler for ruby
esbuilder - Integrate esbuild into Rails
Rbenchmarker - Automatically log benchmarks for all methods
Doorkeeper - Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
curses - Ruby binding for curses, ncurses, and PDCurses. Formerly part of the ruby standard library.
ransack - Object-based searching.