Search in sources :

Example 1 with FrameGrouping

use of com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping in project honest-profiler by jvm-profiling-tools.

the class DescendantFlatAggregatorTest method testDescendantFlatAggregator.

@Test
public void testDescendantFlatAggregator() {
    for (ThreadGrouping tg : ThreadGrouping.values()) {
        for (FrameGrouping fg : FrameGrouping.values()) {
            checkLeafDescendants(tg, fg);
            checkMultipleDescendantsSingleThread(tg, fg);
            checkMultipleDescendantsTwoThreads(tg, fg);
        }
    }
}
Also used : ThreadGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping) Test(org.junit.Test)

Example 2 with FrameGrouping

use of com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping in project honest-profiler by jvm-profiling-tools.

the class AbstractViewController method bindGroupings.

/**
 * Configures the grouping controls, ensuring a new {@link CombinedGrouping} is set whenever either a new
 * {@link ThreadGrouping} or {@link FrameGrouping} is selected.
 * <p>
 * Also sets the initial selection to the first grouping supplied by the
 * {@link #setAllowedFrameGroupings(FrameGrouping...)} and {@link #setAllowedThreadGroupings(ThreadGrouping...)}
 * methods.
 */
private void bindGroupings() {
    if (threadGrouping == null || frameGrouping == null || threadGrouping.getItems().size() == 0 || frameGrouping.getItems().size() == 0) {
        return;
    }
    threadGrouping.getSelectionModel().selectedItemProperty().addListener((property, oldValue, newValue) -> {
        if (newValue != null) {
            FrameGrouping other = frameGrouping.getSelectionModel().getSelectedItem();
            if (other != null) {
                grouping.set(combine(newValue, other));
            }
        }
    });
    frameGrouping.getSelectionModel().selectedItemProperty().addListener((property, oldValue, newValue) -> {
        if (newValue != null) {
            ThreadGrouping other = threadGrouping.getSelectionModel().getSelectedItem();
            if (other != null) {
                grouping.set(combine(other, newValue));
            }
        }
    });
    threadGrouping.getSelectionModel().select(0);
    frameGrouping.getSelectionModel().select(0);
}
Also used : ThreadGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping)

Example 3 with FrameGrouping

use of com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping in project honest-profiler by jvm-profiling-tools.

the class AncestorTreeAggregatorTest method testAncestorTreeAggregator.

@Test
public void testAncestorTreeAggregator() {
    for (ThreadGrouping tg : ThreadGrouping.values()) {
        for (FrameGrouping fg : FrameGrouping.values()) {
            checkLeafAncestors(tg, fg);
            checkMultipleAncestorsSingleThread(tg, fg);
            checkMultipleAncestorsTwoThreads(tg, fg);
        }
    }
}
Also used : ThreadGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping) Test(org.junit.Test)

Example 4 with FrameGrouping

use of com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping in project honest-profiler by jvm-profiling-tools.

the class DescendantTreeAggregatorTest method testDescendantTreeAggregator.

@Test
public void testDescendantTreeAggregator() {
    for (ThreadGrouping tg : ThreadGrouping.values()) {
        for (FrameGrouping fg : FrameGrouping.values()) {
            checkLeafDescendants(tg, fg);
            checkMultipleDescendantsSingleThread(tg, fg);
            checkMultipleDescendantsTwoThreads(tg, fg);
        }
    }
}
Also used : ThreadGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping) Test(org.junit.Test)

Aggregations

FrameGrouping (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping)4 ThreadGrouping (com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping)4 Test (org.junit.Test)3