use of com.insightfullogic.honest_profiler.core.sources.LogSource in project honest-profiler by jvm-profiling-tools.
the class FlameGraphDumperApplication method main.
public static void main(String[] args) throws Exception {
if (args.length < 2) {
System.out.print("Usage: java com.insightfullogic.honest_profiler.ports.console.FlameGraphApplication <profile.hpl> <profile.txt>\n" + "\n" + "The output needs to be processed with the tools at https://github.com/brendangregg/FlameGraph to produce the actual flamegraph\n");
System.exit(1);
}
String in = args[0], out = args[1];
LogSource source = new FileLogSource(new File(in));
try (Writer output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(out)))) {
FlameGraph data = FlameGraphCollector.readFlamegraph(source);
for (FlameTrace trace : data.getTraces()) {
writeTrace(output, trace);
}
}
}
Aggregations