protected static <T> Statistics time(String desc, int repeat, Callable<T> runnable, Consumer<T> cleanup) throws InterruptedException { sw.start(); try { sws.time(repeat, runnable, result -> { if (cleanup != null) cleanup.accept(result); }); } catch (Throwable t) { t.printStackTrace(); fail(t.getMessage()); } sw.stop(); // if (desc != null) Testing.print(60, "Time to " + desc + ":", sw.durations().statistics().getTotalAsString()); // Testing.print(60,"Total clock time:",sw.durations().statistics().getTotalAsString()); // Testing.print(54,"Time to invoke the functions:",sws); return sw.durations().statistics(); }
Testing.print("Waited a total of " + sw.durations().statistics().getTotalAsString() + " for the replica to catch up to the master."); } catch (InterruptedException e) { Thread.interrupted();
Testing.print("Waited a total of " + sw.durations().statistics().getTotalAsString() + " for the replica to catch up to the master."); } catch (InterruptedException e) { Thread.interrupted();
public static Statistics completionTime() { return sw.durations().statistics(); }