!7 sclass Profiler extends DynBigNumber { transient new PerSecondCounter counter; void start { setDescription("Java CPU"); ownTimer(doEvery(100, r sample)); } void sample { counter.inc(l(runnableThreadsWithStackTraces())); setValue(formatDouble(counter.get()*100, 2) + " %"); } }