Beispiel #1
0
 @Override
 public <T> Command<T> timeExecution(
     final Command<T> execution, final String group, final String name) {
   final CheckedCommand<T> command = metricsSpi.timeExecution(execution, group, name);
   return () -> {
     try {
       return command.call();
     } catch (RuntimeException e1) {
       throw e1;
     } catch (Throwable e2) {
       throw new RuntimeException(e2);
     }
   };
 }
Beispiel #2
0
 @Override
 public <T> Supplier<Observable<T>> timeObservable(
     Supplier<Observable<T>> observableFactory, String group, String name) {
   return metricsSpi.timeObservable(observableFactory, group, name);
 }
Beispiel #3
0
 @Override
 public <T> CheckedCommand<T> timeExecution(
     CheckedCommand<T> execution, String group, String name) {
   return metricsSpi.timeExecution(execution, group, name);
 }