use of com.insightfullogic.honest_profiler.core.profiles.lean.LeanThreadNode in project honest-profiler by jvm-profiling-tools.
the class AggregationProfileTest method checkThreadInfoLogic.
@Test
public void checkThreadInfoLogic() {
LeanProfileGenerator gen = new LeanProfileGenerator();
SCENARIOS.get(7).executeAndEnd(gen);
LeanProfile leanProfile = gen.getProfile();
for (LeanThreadNode threadNode : leanProfile.getThreads().values()) {
assertNull(threadNode.getThreadInfo());
}
AggregationProfile profile = new AggregationProfile(leanProfile);
Map<Long, LeanThreadNode> threads = profile.getSource().getThreads();
// Check ThreadInfo has been updated
assertNotNull("Missing ThreadInfo for thread 1", threads.get(1L).getThreadInfo());
assertNotNull("Missing ThreadInfo for thread 2", threads.get(2L).getThreadInfo());
assertNotNull("Missing ThreadInfo for thread 3", threads.get(3L).getThreadInfo());
assertNotNull("Missing ThreadInfo for thread 4", threads.get(4L).getThreadInfo());
assertNotNull("Missing ThreadInfo for thread 5", threads.get(5L).getThreadInfo());
assertNull("There should be no ThreadInfo for thread 6", threads.get(6L).getThreadInfo());
}
Aggregations