protected AbstractEngineStopwatch() { stopwatch = new StopwatchGC[getNumberOfCategories()]; for (int i = 0; i < getNumberOfCategories(); i++) { stopwatch[i] = new StopwatchGC(getCategoryNames()[i]); } }
protected AbstractEngineStopwatch() { stopwatch = new StopwatchGC[getNumberOfCategories()]; for (int i = 0; i < getNumberOfCategories(); i++) { stopwatch[i] = new StopwatchGC(getCategoryNames()[i]); } }
@Override public final String report() { StringBuilder result = new StringBuilder(); long total = 0; for (int i = 0; i < getNumberOfCategories(); i++) { total += stopwatch[i].getElapsedMillis(); result.append(getCategoryNames()[i]).append(": ").append(stopwatch[i].getElapsedMillis()).append('\n'); } result.append("Total : ").append(total).append('\n'); return result.toString(); }
@Override public final String report() { StringBuilder result = new StringBuilder(); long total = 0; for (int i = 0; i < getNumberOfCategories(); i++) { total += stopwatch[i].getElapsedMillis(); result.append(getCategoryNames()[i]).append(": ").append(stopwatch[i].getElapsedMillis()).append('\n'); } result.append("Total : ").append(total).append('\n'); return result.toString(); }