/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the split time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the split time as a String * @since 2.1 */ public String toSplitString() { return DurationFormatUtils.formatDurationHMS(getSplitTime()); }
public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
public String toSplitString() { return DurationFormatUtils.formatDurationHMS(getSplitTime()); }
public String toLapString() { return DurationFormatUtils.formatDurationHMS(getLapTime()); }
@Override void processItem(final String agent) { try { if (masterModel.isHostUp(agent)) { // Host UP -- nothing to do return; } final AgentInfo agentInfo = masterModel.getAgentInfo(agent); if (agentInfo == null) { return; } final long downSince = agentInfo.getStartTime() + agentInfo.getUptime(); final long downDurationMillis = clock.now().getMillis() - downSince; if (downDurationMillis >= timeoutMillis) { try { log.info("Reaping dead agent '{}' (DOWN for {} hours)", agent, DurationFormatUtils.formatDurationHMS(downDurationMillis)); masterModel.deregisterHost(agent); } catch (Exception e) { log.warn("Failed to reap agent '{}'", agent, e); } } } catch (Exception e) { log.warn("Failed to determine if agent '{}' should be reaped", agent, e); } } }
private String runningTime(long millis) { return DurationFormatUtils.formatDurationHMS(millis); }
/** * <p> * Gets a summary of the split time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the split time as a String * @since 2.1 */ public String toSplitString() { return DurationFormatUtils.formatDurationHMS(getSplitTime()); }
/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the split time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the split time as a String * @since 2.1 */ public String toSplitString() { return DurationFormatUtils.formatDurationHMS(getSplitTime()); }
/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the time as a String */ public String toString() { return DurationFormatUtils.formatDurationHMS(getTime()); }
/** * <p> * Gets a summary of the split time that the stopwatch recorded as a string. * </p> * * <p> * The format used is ISO8601-like, <i>hours</i>:<i>minutes</i>:<i>seconds</i>.<i>milliseconds</i>. * </p> * * @return the split time as a String * @since 2.1 */ public String toSplitString() { return DurationFormatUtils.formatDurationHMS(getSplitTime()); }
protected String getLoggedMessage( final String action, final long started ) { final String startedStr = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format( started ); final String durationStr = DurationFormatUtils.formatDurationHMS( System.currentTimeMillis() - started ); return String.format( "%s (started %s, runtime %s)", getLoggedMessage( action ), startedStr, durationStr ); }
private void report() { long duration = this.endTime - this.startTime; if (duration == 0) { return; } println("errors found: %s", this.errors); println("duration: %s", DurationFormatUtils.formatDurationHMS(duration)); println("speed: %d/sec", this.count * 1000 / duration); }
private void testDelete() { StopWatch stopWatch = new StopWatch(); stopWatch.start(); MutationDeleter.deleteAllWithPrefix(PREFIX); stopWatch.stop(); System.out.printf("Deleting %d mutations took %s\n", LIMIT, DurationFormatUtils.formatDurationHMS(stopWatch.getTime())); }
public static String buildLabel(Build build) { String status = ""; if (build.isBuilding()) { status = " (running)"; } return String.format("#%d (%s) duration: %s %s", build.getNumber(), DateFormatUtil.formatDateTime(build.getTimestamp()), DurationFormatUtils.formatDurationHMS(build.getDuration()), status); }
private void testInsert() { StopWatch stopWatch = new StopWatch(); stopWatch.start(); QueryManager.saveMutations(getMutations()); stopWatch.stop(); System.out.println("Inserting " + LIMIT + " mutations took " + DurationFormatUtils.formatDurationHMS(stopWatch.getTime())); }