@Override public void profile(){
  profileCount++;
  for (  ThreadInfo thread : getAllRunnableThreads()) {
    if (thread.getStackTrace().length > 0) {
      String traceKey=StackTraceFormatter.formatStackTrace(thread.getStackTrace());
      if (filter.includeStackTrace(traceKey)) {
        traces.increment(traceKey,1);
      }
    }
  }
  if (profileCount == reportingFrequency) {
    profileCount=0;
    recordMethodCounts();
  }
}

@ Override public void profile ( ) { profileCount ++ ; for ( ThreadInfo thread : getAllRunnableThreads ( ) ) { if ( thread . getStackTrace ( ) . length > 0 ) { String traceKey = StackTraceFormatter . formatStackTrace ( thread . getStackTrace ( ) ) ; if ( filter . includeStackTrace ( traceKey ) ) { traces . increment ( traceKey , 1 ) ; } } } if ( profileCount == reportingFrequency ) { profileCount = 0 ; recordMethodCounts ( ) ; } }
profile cpu time by method call
