@Override public void afterExecution(SqlExecutionEvent event) { long elapsed = event.getStopTimeMillis() - event.getStartTimeMillis(); String count = FormatUtils.getCount(this.count); String sources = FormatUtils.getCount(event.getContext().getSuppliers().size()); String size = FormatUtils.getSize(this.size); String time = FormatUtils.getTime(elapsed); String rate = FormatUtils.getRate(elapsed, this.size); String throughput = FormatUtils.getThroughputInSeconds(elapsed, this.count, "SQL/s"); Object[] args = { count, sources, size, time, throughput, rate }; if (showRate) { LoggerUtils.logMsg("Completed - [SQL Count: {} Sources: {} Size: {} Time: {} Throughput: {} Rate: {}]", args, logger, loggerLevel); } else { LoggerUtils.logMsg("Completed - [SQL Count: {} Sources: {} Size: {} Time: {} Throughput: {}]", args, logger, loggerLevel); } }
@Override public void afterExecution(SqlExecutionEvent event) { long elapsed = event.getStopTimeMillis() - event.getStartTimeMillis(); String count = FormatUtils.getCount(this.count); String sources = FormatUtils.getCount(event.getContext().getSuppliers().size()); String size = FormatUtils.getSize(this.size); String time = FormatUtils.getTime(elapsed); String rate = FormatUtils.getRate(elapsed, this.size); String throughput = FormatUtils.getThroughputInSeconds(elapsed, this.count, throughputLabel); Object[] args = { label, count, sources, size, time, throughput, rate }; if (showRate) { LoggerUtils.logMsg("Completed - [{}: {} Sources: {} Size: {} Time: {} Throughput: {} Rate: {}]", args, logger, loggerLevel); } else { LoggerUtils.logMsg("Completed - [{}: {} Sources: {} Size: {} Time: {} Throughput: {}]", args, logger, loggerLevel); } }