@Override public void run() { if (!FileSystemInstrumentation.this.closed) { onClose(); } } });
@Override public synchronized void close() throws IOException { if (!this.closed) { onClose(); this.closed = true; } super.close(); }
@Override protected void onClose() { StringBuilder message = new StringBuilder(); message.append("========================").append("\n"); message.append("Statistics for FileSystem: ").append(getUri()).append("\n"); message.append("------------------------").append("\n"); message.append("method\tcalls\tmean time(ns)\t99 percentile(ns)").append("\n"); for (ContextAwareTimer timer : this.allTimers) { if (timer.getCount() > 0) { message.append(timer.getName()).append("\t").append(timer.getCount()).append("\t"). append(timer.getSnapshot().getMean()).append("\t").append(timer.getSnapshot().get99thPercentile()).append("\n"); } } message.append("------------------------").append("\n"); log.info(message.toString()); super.onClose(); }
@Override public void run() { if (!FileSystemInstrumentation.this.closed) { onClose(); } } });
@Override public synchronized void close() throws IOException { if (!this.closed) { onClose(); this.closed = true; } super.close(); }
@Override protected void onClose() { StringBuilder message = new StringBuilder(); message.append("========================").append("\n"); message.append("Statistics for FileSystem: ").append(getUri()).append("\n"); message.append("------------------------").append("\n"); message.append("method\tcalls\tmean time(ns)\t99 percentile(ns)").append("\n"); for (ContextAwareTimer timer : this.allTimers) { if (timer.getCount() > 0) { message.append(timer.getName()).append("\t").append(timer.getCount()).append("\t"). append(timer.getSnapshot().getMean()).append("\t").append(timer.getSnapshot().get99thPercentile()).append("\n"); } } message.append("------------------------").append("\n"); log.info(message.toString()); super.onClose(); }