3 ms·
Strange. My expectation would be that you'd hook a profiler up to the web process and it would simply follow all ruby code paths, regardless of whether Rails w
by jasonkester 18y ago
Strange. My expectation would be that you'd hook a profiler up to the web process and it would simply follow all ruby code paths, regardless of whether Rails were involved or not. Or do we have different definitions of Profiler?
You're talking about a separate application that watches executing code and keeps statistics, right? As in, not simply a set of timing functions in a wrapper somewhere in the framework? If so, how does it come off the trolley after Rails finishes its job?
- kscaldef 18y agoruby-prof is a module that runs inside the ruby process, and hooks into the interpreter to track what's happening. You have options for how to run it. You can run the entire program within the profiler, but if you do that, you won't get data out until the process ends (you kill the webserver, in this case). Or, you can do what's more typical for profiling Rails, which is to explicitly activate the profiler for the course of a single request, and report on that single request.