Search in sources :

Example 1 with CallTree

use of com.jetbrains.actionscript.profiler.calltree.CallTree in project intellij-plugins by JetBrains.

the class CPUSnapshotView method buildPerformanceSamples.

private void buildPerformanceSamples(final DefaultTreeModel treeModel) {
    final boolean skipSystemStuff = myFilterSystemStuff.isSelected();
    CallTree filteredCallTree = rawCallTree;
    if (skipSystemStuff) {
        filteredCallTree = CallTreeUtil.filterSystemStuff(filteredCallTree);
    }
    final Pair<Map<FrameInfo, Long>, Map<FrameInfo, Long>> countMaps = filteredCallTree.getTimeMaps();
    final Map<FrameInfo, Long> countMap = countMaps.getFirst();
    final Map<FrameInfo, Long> selfCountMap = countMaps.getSecond();
    DefaultMutableTreeNode tracesRoot = (DefaultMutableTreeNode) treeModel.getRoot();
    JTreeUtil.removeChildren(tracesRoot, treeModel);
    fillTreeModelRoot(tracesRoot, filteredCallTree, countMap, selfCountMap, true, FrameInfo.EMPTY_FRAME_INFO_ARRAY);
    treeModel.reload();
}
Also used : FrameInfo(com.jetbrains.actionscript.profiler.sampler.FrameInfo) DefaultMutableTreeNode(javax.swing.tree.DefaultMutableTreeNode) CallTree(com.jetbrains.actionscript.profiler.calltree.CallTree) Map(java.util.Map)

Aggregations

CallTree (com.jetbrains.actionscript.profiler.calltree.CallTree)1 FrameInfo (com.jetbrains.actionscript.profiler.sampler.FrameInfo)1 Map (java.util.Map)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1