Search in sources :

Example 6 with NumericInfo

use of com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo in project honest-profiler by jvm-profiling-tools.

the class LeanProfileGenerator method assertTimesEqual.

public void assertTimesEqual(long selfTime, long totalTime, long threadId, StackFrame... stack) {
    NumericInfo info = getNode(threadId, stack).getData();
    assertEquals("Wrong Self Time", BigInteger.valueOf(selfTime), info.getSelfTime());
    assertEquals("Wrong Total Time", BigInteger.valueOf(totalTime), info.getTotalTime());
}
Also used : NumericInfo(com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo)

Example 7 with NumericInfo

use of com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo in project honest-profiler by jvm-profiling-tools.

the class LeanProfileGenerator method assertSelfTimeEquals.

public void assertSelfTimeEquals(long selfTime, long threadId, StackFrame... stack) {
    NumericInfo info = getNode(threadId, stack).getData();
    assertEquals("Wrong Self Time", BigInteger.valueOf(selfTime), info.getSelfTime());
}
Also used : NumericInfo(com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo)

Example 8 with NumericInfo

use of com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo in project honest-profiler by jvm-profiling-tools.

the class AggregationProfileTest method checkGlobalAggregation.

@Test
public void checkGlobalAggregation() {
    LeanProfileGenerator gen = new LeanProfileGenerator();
    SCENARIOS.get(7).executeAndEnd(gen);
    AggregationProfile profile = new AggregationProfile(gen.getProfile());
    NumericInfo global = profile.getGlobalData();
    assertEquals("Global Self Count should be 0", 0, global.getSelfCnt());
    assertEquals("Global Total Count wrong", 111, global.getTotalCnt());
    assertEquals("Global Self Time should be 0", ZERO, global.getSelfTime());
    assertEquals("Global Total Time wrong", valueOf(nano(111)), global.getTotalTime());
}
Also used : LeanProfileGenerator(com.insightfullogic.honest_profiler.framework.generator.LeanProfileGenerator) NumericInfo(com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo) Test(org.junit.Test)

Aggregations

NumericInfo (com.insightfullogic.honest_profiler.core.profiles.lean.info.NumericInfo)8 TreeDiff (com.insightfullogic.honest_profiler.core.aggregation.result.diff.TreeDiff)1 Node (com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node)1 Tree (com.insightfullogic.honest_profiler.core.aggregation.result.straight.Tree)1 LeanProfileGenerator (com.insightfullogic.honest_profiler.framework.generator.LeanProfileGenerator)1 Test (org.junit.Test)1