< prev index next >
src/jdk/nashorn/internal/runtime/Timing.java
Print this page
rev 1901 : 8135251: Use Unsafe.defineAnonymousClass for loading Nashorn script code
Reviewed-by: hannesw, lagergren, sundar
*** 221,243 ****
knownTime += duration;
}
final long total = t - startTime;
! sb.append('\n');
! sb.append("Total runtime: ").
append(toMillisPrint(total)).
append(" ms (Non-runtime: ").
append(toMillisPrint(knownTime)).
append(" ms [").
append((int)(knownTime * 100.0 / total)).
! append("%])");
!
! sb.append("\n\nEmitted compile units: ").
! append(CompileUnit.getEmittedUnitCount());
!
! return sb.toString();
}
private void accumulateTime(final String module, final long duration) {
timings.computeIfAbsent(module, newTimingCreator).add(duration);
}
--- 221,244 ----
knownTime += duration;
}
final long total = t - startTime;
! return sb.append("\nTotal runtime: ").
append(toMillisPrint(total)).
append(" ms (Non-runtime: ").
append(toMillisPrint(knownTime)).
append(" ms [").
append((int)(knownTime * 100.0 / total)).
! append("%])").
! append("\n\nEmitted compile units: ").
! append(CompileUnit.getEmittedUnitCount()).
! append("\nCompile units installed as named classes: ").
! append(Context.getNamedInstalledScriptCount()).
! append("\nCompile units installed as anonymous classes: ").
! append(Context.getAnonymousInstalledScriptCount()).
! toString();
}
private void accumulateTime(final String module, final long duration) {
timings.computeIfAbsent(module, newTimingCreator).add(duration);
}
< prev index next >