use of com.jetbrains.actionscript.profiler.vo.CallInfo in project intellij-plugins by JetBrains.
the class CallTreeTable method getHotSpotsColumns.
private static ColumnInfo[] getHotSpotsColumns() {
final ColumnInfo methodsColumn = new ColumnInfo("Methods") {
@Override
public Class getColumnClass() {
return TreeTableModel.class;
}
@Override
public Object valueOf(final Object o) {
return o;
}
@Override
public Comparator getComparator() {
return new FrameNameComparator();
}
};
final ColumnInfo countColumn = new AbstractCallColumnInfo("Cumulative time, ms") {
@Override
public Comparator<DefaultMutableTreeNode> getComparator() {
return new CumulativeTimeComparator();
}
@Override
protected long extractValueFromCallInfo(CallInfo value) {
return value.getCumulativeTime();
}
};
final ColumnInfo selfColumn = new AbstractCallColumnInfo("Self time, ms") {
@Override
public Comparator<DefaultMutableTreeNode> getComparator() {
return new SelfTimeComparator();
}
@Override
protected long extractValueFromCallInfo(CallInfo value) {
return value.getSelfTime();
}
};
return new ColumnInfo[] { methodsColumn, countColumn, selfColumn };
}
use of com.jetbrains.actionscript.profiler.vo.CallInfo in project intellij-plugins by JetBrains.
the class MergedCallNode method doLoadChildren.
@Override
protected void doLoadChildren() {
FrameInfo[] frames = Arrays.copyOf(callFrames, callFrames.length + 1);
frames[frames.length - 1] = getFrameInfo();
Pair<Map<FrameInfo, Long>, Map<FrameInfo, Long>> countMaps;
if (backTrace) {
countMaps = callTree.getCallersTimeMaps(frames);
} else {
countMaps = callTree.getCalleesTimeMaps(ArrayUtil.reverseArray(frames));
}
final Map<FrameInfo, Long> countMap = countMaps.getFirst();
final Map<FrameInfo, Long> selfCountMap = countMaps.getSecond();
List<FrameInfo> traces = ResolveUtil.filterByScope(countMap.keySet(), scope);
ArrayList<CallInfo> callInfos = new ArrayList<>();
for (final FrameInfo t : traces) {
callInfos.add(new CallInfo(t, countMap.get(t), selfCountMap.get(t)));
}
for (int index = 0; index < callInfos.size(); ++index) {
insert(new MergedCallNode<T>(callInfos.get(index), callTree, frames, backTrace, scope), index);
}
}
use of com.jetbrains.actionscript.profiler.vo.CallInfo in project intellij-plugins by JetBrains.
the class CPUSnapshotView method fillTreeModelRoot.
private <T extends Sample> void fillTreeModelRoot(TreeNode node, CallTree callTree, final Map<FrameInfo, Long> countMap, final Map<FrameInfo, Long> selfCountMap, boolean backTrace, FrameInfo[] frames) {
final MutableTreeNode root = (MutableTreeNode) node;
List<FrameInfo> traces = scopeMatcher.fun(new ArrayList<>(countMap.keySet()));
GlobalSearchScope scope = getCurrentScope();
int index = 0;
for (final FrameInfo s : traces) {
root.insert(new MergedCallNode<T>(new CallInfo(s, countMap.get(s), selfCountMap.get(s)), callTree, frames, backTrace, scope), index++);
}
}
Aggregations