use of com.insightfullogic.honest_profiler.core.parser.StackFrame in project honest-profiler by jvm-profiling-tools.
the class ProfileTreeTest method rendersSingleNode.
@Test
public void rendersSingleNode() {
collector.handle(new TraceStart(1, 1, 0L, 0L));
collector.handle(new StackFrame(20, ProfileFixtures.printlnId));
collector.handle(ProfileFixtures.println);
collector.endOfLog();
ProfileNode node = assertProfileHasSingleTree();
assertEquals(0L, node.children().count());
assertNode(ProfileFixtures.println, 1.0, node);
}
use of com.insightfullogic.honest_profiler.core.parser.StackFrame in project honest-profiler by jvm-profiling-tools.
the class CallCountAggregator method toFlatProfileEntry.
private FlatProfileEntry toFlatProfileEntry(final T key, final CallCounts callCounts, final int traceCount) {
int totalCount = callCounts.getTimeAppeared();
int selfCount = callCounts.getTimeInvokingThis();
Method method;
final Long methodId = getMethodId.apply(key);
method = methodByMethodId.get(methodId);
if (method == null) {
method = new Method(methodId, "UNKNOWN", "UNKNOWN", String.valueOf(methodId));
}
Frame frame;
if (key instanceof StackFrame) {
frame = new FullFrame(method, (StackFrame) key);
} else {
frame = method;
}
return new FlatProfileEntry(frame, totalCount, selfCount, traceCount);
}
Aggregations