Search in sources :

Example 1 with SampleKey

use of org.spf4j.stackmonitor.SampleGraph.SampleKey in project spf4j by zolyfarkas.

the class HotFlameStackPanel method getDetail.

@Override
@Nullable
public String getDetail(final Point location) {
    List<SampleKey> tips = search(location.x, location.y, 0, 0);
    if (tips.size() >= 1) {
        final SampleKey key = tips.get(0);
        final AggSample node = completeGraph.getAggNode(key);
        StringBuilder sb = new StringBuilder();
        sb.append(node).append('-').append(node.getNrSamples()).append("\n invoked from: ");
        appendEdgeInfo(completeGraph.getParents(node), sb);
        sb.append("\n invoking: ");
        appendEdgeInfo(completeGraph.getChildren(node), sb);
        return sb.toString();
    } else {
        return null;
    }
}
Also used : AggSample(org.spf4j.stackmonitor.SampleGraph.AggSample) SampleKey(org.spf4j.stackmonitor.SampleGraph.SampleKey) Nullable(javax.annotation.Nullable)

Example 2 with SampleKey

use of org.spf4j.stackmonitor.SampleGraph.SampleKey in project spf4j by zolyfarkas.

the class HotFlameStackPanel method drill.

@Override
public void drill() {
    List<SampleKey> tips = search(xx, yy, 0, 0);
    if (tips.size() >= 1) {
        SampleKey sample = tips.get(0);
        Set<Sample> samples = completeGraph.getSamples(sample);
        Iterator<SampleGraph.Sample> iterator = samples.iterator();
        SampleNode agg = iterator.next().getNode();
        while (iterator.hasNext()) {
            agg = SampleNode.aggregate(agg, iterator.next().getNode());
        }
        updateSamples(sample.getMethod(), agg);
        repaint();
    }
}
Also used : Sample(org.spf4j.stackmonitor.SampleGraph.Sample) AggSample(org.spf4j.stackmonitor.SampleGraph.AggSample) SampleNode(org.spf4j.stackmonitor.SampleNode) SampleKey(org.spf4j.stackmonitor.SampleGraph.SampleKey)

Example 3 with SampleKey

use of org.spf4j.stackmonitor.SampleGraph.SampleKey in project spf4j by zolyfarkas.

the class HotFlameStackPanel method filter.

@Override
public void filter() {
    List<SampleKey> tips = search(xx, yy, 0, 0);
    if (tips.size() >= 1) {
        final SampleKey value = tips.get(0);
        updateSamples(getMethod(), getSamples().filteredBy(new EqualsPredicate<>(value.getMethod())));
        repaint();
    }
}
Also used : EqualsPredicate(org.spf4j.base.EqualsPredicate) SampleKey(org.spf4j.stackmonitor.SampleGraph.SampleKey)

Aggregations

SampleKey (org.spf4j.stackmonitor.SampleGraph.SampleKey)3 AggSample (org.spf4j.stackmonitor.SampleGraph.AggSample)2 Nullable (javax.annotation.Nullable)1 EqualsPredicate (org.spf4j.base.EqualsPredicate)1 Sample (org.spf4j.stackmonitor.SampleGraph.Sample)1 SampleNode (org.spf4j.stackmonitor.SampleNode)1