use of org.gridkit.jvmtool.stacktrace.analytics.flame.FlameGraphGenerator in project jvm-tools by aragozin.
the class FlameCheck method check.
@Test
public void check() throws IOException {
FlameGraphGenerator fg = new FlameGraphGenerator();
StackTraceReader r = read();
if (!r.isLoaded()) {
r.loadNext();
}
while (r.isLoaded()) {
fg.feed(r.getStackTrace());
r.loadNext();
}
StringWriter sw = new StringWriter();
fg.renderSVG("Flame Graph", 1200, sw);
FileWriter fw = new FileWriter(new File("target/flame.svg"));
fw.append(sw.getBuffer());
fw.close();
}
Aggregations