Пример #1
0
 /** {@inheritDoc} */
 public final StopwatchSample getStopwatchSampleAndReset(String name) {
   Simon s = manager.getSimon(name);
   if (s != null && s instanceof Stopwatch) {
     return new StopwatchSample((org.javasimon.StopwatchSample) s.sampleAndReset());
   }
   return null;
 }
Пример #2
0
 /** {@inheritDoc} */
 public final CounterSample getCounterSampleAndReset(String name) {
   Simon s = manager.getSimon(name);
   if (s != null && s instanceof Counter) {
     return new CounterSample((org.javasimon.CounterSample) s.sampleAndReset());
   }
   return null;
 }