@Override public void logProgress(int executedOps) { long now = TimeService.nanoTime(); //make sure this info is not printed more frequently than 20 secs if (lastPrint < 0 || (now - lastPrint) < logFrequency) { return; } synchronized (this) { if (now - lastPrint < logFrequency) return; lastPrint = now; //make sure negative durations are not printed long remaining = Math.max(0, (startTime + duration) - now); log.infof(PROGRESS_STRING, executedOps, Utils.getNanosDurationString(now - startTime), Utils.getNanosDurationString(remaining), Utils.getNanosDurationString(duration)); } } }
@Override public void logProgress(int executedOps) { long now = TimeService.nanoTime(); //make sure this info is not printed more frequently than 20 secs if (lastPrint < 0 || (now - lastPrint) < logFrequency) { return; } synchronized (this) { if (now - lastPrint < logFrequency) return; lastPrint = now; log.infof(PROGRESS_STRING, executedOps, Utils.getNanosDurationString(now - startTime), operationCount.toString(), operationsPerNode); } } }
public DistStageAck executeOnSlave() { if (!isServiceRunning()) { log.info("Not running test on this slave as service is not running."); return successfulResponse(); } prepare(); try { long startNanos = TimeService.nanoTime(); log.info("Starting test " + testName); stressorsManager = setUpAndStartStressors(); waitForStressorsToFinish(stressorsManager); destroy(); log.info("Finished test. Test duration is: " + Utils.getNanosDurationString(TimeService.nanoTime() - startNanos)); return newStatisticsAck(stressorsManager.getStressors()); } catch (Exception e) { return errorResponse("Exception while initializing the test", e); } }