测量在JVM上花费在GC上的时间 [英] Measuring time spent on GC in JVM
本文介绍了测量在JVM上花费在GC上的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
-Xloggc
和<$ 在启动JVM时,c $ c> -XX:-PrintGCTimeStamps
选项。我认为它会显示垃圾收集需要多长时间。 http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
Suppose I am testing a Java server application. I know how much time it takes to finish the test. Now I'd like to know how much was spent on GC during that test. How can I do it?
解决方案
The simplest way is to use the -Xloggc
and -XX:-PrintGCTimeStamps
options when starting up your JVM. I think it prints out how long garbage collection takes.
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
这篇关于测量在JVM上花费在GC上的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文