Efficient way of getting thread CPU time using JMX

后端 未结 5 980
后悔当初
后悔当初 2020-12-31 22:19

I\'m currently getting the total thread CPU time using JMX in the following manner:

private long calculateTotalThreadCpuTime(ThreadMXBean thread) {

    long         


        
5条回答
  •  迷失自我
    2020-12-31 23:01

    Can you talk more about how you're planning on using this information? You can get thread CPU times using a JVMTI based agent, which should perform slightly better than JMX. How have you measured the overhead of the JMX approach that lead you to the conclusion of 'dreadful' performance?

提交回复
热议问题