@Override @SuppressFBWarnings("ISB_TOSTRING_APPENDING") @Nullable public String getDetail(final Point location) { List<Pair<Method, SampleNode>> tips = search(location.x, location.y, 0, 0); if (tips.size() >= 1) { final Pair<Method, SampleNode> m = tips.get(0); return Methods.toString(m.getFirst()) + '-' + m.getSecond().getSampleCount(); } else { return null; } }
appendable.append("\":"); SampleNode sn = s.getValue(); appendable.append(Integer.toString(sn.getSampleCount())); TMap<Method, SampleNode> cSn = sn.getSubNodes(); if (cSn != null) {
SampleNode sn = entry.getValue(); if (predicate.test(method)) { newCount -= sn.getSampleCount(); } else { if (sns == null) { newCount -= sn.getSampleCount(); } else { newCount -= sn.getSampleCount() - sn2.getSampleCount(); sns.put(method, sn2);
final Graphics2D g2, final int x, final int py, final int width, final int height, final int depth) { int y = py; int sampleCount = node.getSampleCount(); String val = Methods.toString(method) + '-' + sampleCount; setElementColor(depth, g2); int childWidth = (int) (scale * cnode.getSampleCount()); if (childWidth > 0) { maxY = Math.max(maxY, paintNode(entry.getKey(), cnode, g2, relX, y, childWidth, height, depth + 1));
public void add(final SampleNode node) { this.sampleCount += node.getSampleCount(); TMap<Method, SampleNode> oSubNodes = (TMap<Method, SampleNode>) node.getSubNodes(); if (this.subNodes == null) { this.subNodes = oSubNodes; } else if (oSubNodes != null) { oSubNodes.forEachEntry((final Method m, final SampleNode b) -> { SampleNode other = subNodes.get(m); if (other == null) { subNodes.put(m, b); } else { other.sampleCount += b.sampleCount; } return true; }); } }
private Sample tree2Graph(final Method m, final SampleNode node) { Sample parentVertex = new Sample(new SampleKey(m, 0), node.getSampleCount(), 0, node); if (!sampleTree.addNode(parentVertex)) { throw new IllegalStateException(); while ((t = dq.pollFirst()) != null) { SampleKey vtxk = new SampleKey(t.method, computeMethodIdx(t.parent, t.method)); Sample vtx = new Sample(vtxk, t.node.getSampleCount(), t.parent.level + 1, t.node); AggSample aggParent = aggregates.get(t.parent.key); AggSample current;
Assert.assertEquals(node1.getSampleCount() + node2.getSampleCount(), agg.getSampleCount()); final Method method = Methods.getMethod("C1", "m3"); Assert.assertEquals(node1.getSubNodes().get(method).getSampleCount() + node2.getSubNodes().get(method).getSampleCount(), agg.getSubNodes().get(method).getSampleCount());