Search in sources :

Example 1 with UnsampledActiveTraceSnapshot

use of com.navercorp.pinpoint.profiler.context.active.UnsampledActiveTraceSnapshot in project pinpoint by naver.

the class LimitedListTest method newTestData.

private List<ThreadDump> newTestData(int localTransactionId, long startTime, long threadId, int size) {
    List<ThreadDump> result = new ArrayList<ThreadDump>();
    for (int i = 0; i < size; i++) {
        ActiveTraceSnapshot activeTraceSnapshot = new UnsampledActiveTraceSnapshot(localTransactionId, startTime, threadId);
        ThreadInfo threadInfo = mock(ThreadInfo.class);
        ThreadDump threadDump = new ThreadDump(activeTraceSnapshot, threadInfo);
        threadId++;
        localTransactionId++;
        startTime++;
        result.add(threadDump);
    }
    for (ThreadDump threadDump : result) {
        logger.debug("newTestData:{}", threadDump);
    }
    Collections.shuffle(result);
    return result;
}
Also used : ThreadInfo(java.lang.management.ThreadInfo) ArrayList(java.util.ArrayList) UnsampledActiveTraceSnapshot(com.navercorp.pinpoint.profiler.context.active.UnsampledActiveTraceSnapshot) ActiveTraceSnapshot(com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot) UnsampledActiveTraceSnapshot(com.navercorp.pinpoint.profiler.context.active.UnsampledActiveTraceSnapshot)

Aggregations

ActiveTraceSnapshot (com.navercorp.pinpoint.profiler.context.active.ActiveTraceSnapshot)1 UnsampledActiveTraceSnapshot (com.navercorp.pinpoint.profiler.context.active.UnsampledActiveTraceSnapshot)1 ThreadInfo (java.lang.management.ThreadInfo)1 ArrayList (java.util.ArrayList)1