When I open a .jfr file(Java Flight Record) with Java Mission Control, I can find 'Stack Trace', 'Longest' and 'Count' in Thread -> Latencies -> Latency Stack Traces tab. I care about the average but not the longest. There's average in Java Latencies tab, but it contains all latencies related to an event type. Some of them is meaningless for me, for example:
sun.misc.Unsafe.park(boolean, long)
295,569,155,245 436,427
java.util.concurrent.locks.LockSupport.park(Object)
295,569,155,245 344,030
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await()
295,569,155,245 263,418
java.util.concurrent.LinkedBlockingQueue.take()
63,773,776,315 257,531
java.util.concurrent.ThreadPoolExecutor.getTask()
63,773,776,315 257,511
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
63,773,776,315 257,511
java.util.concurrent.ThreadPoolExecutor$Worker.run()
63,773,776,315 257,511
java.lang.Thread.run()
63,773,776,315 257,511
The above is the idle time of thread pool, it's waiting for the next task. The average of this and all other stack traces mixed is meanlingless. I only care about the latencies of business stack traces. How can I get the average of a specific latency stack trace. Can I export the original data to a csv, then I can calculate by myself.