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?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
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