2

I've started dabbling with the JFR + JMC combo which is frankly awesome (great work Hirt & co).

One metric that I'd like to monitor is the cpu usage per thread but I've yet to find out if it's stored anywhere. There are the usual graphs for CPU%, but I'd like to see a similar one broken up into individual threads.

If I connect to a running instance with JMX the stat is available under the threads tab, but I fail to find it for a recorded JFR run. Is that something that already exists or would be easy to implement on my own?

Billybong
  • 697
  • 5
  • 18

1 Answers1

4

Just realized you can create your own custom pages based on arbitrary events.

So from Event browserselect the thread cpu load, right click the event name and select create a new page using the selected event types and in that page simply right click and Show in bar chart -> User mode cpu load -> Average user mode CPU load. Then right click the chart and Group by -> Event thread.

To get more samples to plot you will need to create a new profiling setting, bumping the Thread CPU load event sampling period to whatever makes sense (like 1s or similar).

Billybong
  • 697
  • 5
  • 18