Java profiles showing statistics on demand and program flow

I am looking for profilers that support query profiling statistics, ideally along a program flow (rather than a regular thread call stack). Thus, basically the profiler stack stack + viewing consecutive calls for each individual request, something like this:

doGet                 100ms
+ doFilter             95ms
  + doFilter2          90ms
    + validateValues   20ms
    + calculateX       40ms
      + calc1          10ms
      + calc2          30ms
    + renderResponse   30ms

Which classes / methods are profiled somehow configured, for profiling the trace processing each method call, this, of course, is not applicable.

I know and used dynaTrace, its "PurePath" function ( http://www.dynatrace.com/en/architecture-tame-complexity-with-purepath.aspx ) supports this, but I'm looking for tools that can be used in small projects and Require less initial investment and customization.

Does any "classic" profiler support (YourKit, etc.), and I missed this function?

Application: Provide some background: the main goal is to have statistics for monitoring and analyzing the system in production. First of all, the idea is to get real-time statistics about how long it will take, and in case the response time increases to have data for certain (types) of requests (think JETM + x).

, , . 10% , . AFAIK .

, , , , . , , .

/ .

+3
3

btrace . dtrace, , , Solaris, BSD, OS X.

+1

, TreeMap, . .


, (System.nanoTime()), ThreadLocal. ( ) , , . CSV.

+1

My approach is similar to Peter, but instead of using threadlocals and network computing, I write to the log file when the execution reaches interesting steps. In addition, I used AspectJ to generate log lines, which I found very convenient for adding / removing log lines as I see fit without the need to change the rest of the source code.

+1
source

All Articles