!7 sclass Profiler extends DynBigNumber { transient new PerSecondCounter counter; transient int interval = 100; void enhanceFrame(JInternalFrame frame) { internalFrameTitlePopupMenu(frame, "Start", r startTimer, "Stop", r stopAllTimers); } void start { setDescription("Java Cores Load"); startTimer(); } void startTimer { singleTimer(doEvery(interval, r sample)); } void sample { Map threads = runnableThreadsWithStackTraces(); print(renderAllThreadsWithStackTraces(threads)); counter.inc(print(l(threads))); double value = counter.getLast()*interval/1000; //setValue(formatDouble(value*100, 2) + " %"); //setValue(formatDoubleFull(value/numberOfCores(), 2)); setValue(formatDoubleFull(value, 1)); } }