public override void Print(string name) { string accessStr = _accessStatistics.AccessStatSummary; _logger.info(format("=== %s ===", name)); _logger.info(format("I/Os%n%s", accessStr)); _logger.info(_counts.ToString()); _logger.info(MemoryStats()); _logger.info("Done in " + Format.duration(currentTimeMillis() - _startTime)); }
public override string Timestamp(long timeWritten, TimeZone timeZone) { return(Format.date(timeWritten, timeZone) + "/" + timeWritten); }
public override string ToString() { long stat = AsLong(); return(stat == -1 ? "??" : Format.bytes(stat) + "/s"); }
private static string MemoryStats() { Runtime runtime = Runtime.Runtime; return(format("Memory[used:%s, free:%s, total:%s, max:%s]", Format.bytes(runtime.totalMemory() - runtime.freeMemory()), Format.bytes(runtime.freeMemory()), Format.bytes(runtime.totalMemory()), Format.bytes(runtime.maxMemory()))); }