问题
Nashorn java script engine has built-in profiler which can be invoked like this:
jjs -pcs profiled_script.js
.
This profiler produces a file named NashornProfile.txt. Here is an example line from this file:
0 dyn:getProp|getElem|getMethod:Object 764015 1
What is the format of this file and what is the meaning of each column?
回答1:
The format is:
- Sequential line index
- Function name
- Total time spend inside function
- Hit count for the function
This values are tab separated. Information taken from Nashorn source, JDK 8 GA (nashorn/src/jdk/nashorn/internal/runtime/linker/LinkerCallSite.java:304, ProfileDumper class).
来源:https://stackoverflow.com/questions/26013745/nashorn-profiler-output-format