Thread Profiling: See Exactly What Your App Is Doing
Join the DZone community and get the full member experience.
Join For Free
this post comes from
sam goldstein
at the new relic blog.
railsconf 2013 is right around the corner! and to celebrate, we’re publishing a series of blog post that highlight what’s new and exciting in the world of new relic’s ruby support. don’t forget to check out yesterday’s post on cross application tracing .
new relic tries to bubble up the most significant performance data from your apps like database queries and response times. but sometimes you need to deep dive into how your code is executing to solve a problem.
for times like this, the new relic ruby agent provides a low overhead sampling profiler that collects call graphs for running production apps. these can be triggered on demand from the new relic ui.
the thread profiler works by spawning a background thread that takes snapshots of other threads’ backtraces at regular intervals. over time, the profiles builds up a good representation of where your application is spending most of its time down to the method call level. new relic’s web ui visualizes thread profiles in an interactive hierarchical tree format, highlighting the ‘hot’ methods where the app is spending the most time.
our own jason clark gave a talk on this subject recently at mountain west rubyconf. his session, diy::thread.profile — light-weight profiling in pure ruby , described the techniques he used to write this pure ruby profiler.
for more information on our thread profiling feature, see our thread profiler documentation.
next up: living on the edge — rails 4 & ruby 2
Published at DZone with permission of Leigh Shevchik, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Trending
-
Integration Testing Tutorial: A Comprehensive Guide With Examples And Best Practices
-
Java String Templates Today
-
A Complete Guide to AWS File Handling and How It Is Revolutionizing Cloud Storage
-
MLOps: Definition, Importance, and Implementation
Comments