Object
Microprofiler
Measures different execution time of functions.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic long
gcCount()
long
Chooses the best available on current JVM way to measure the execution time and returns it in milliseconds.long
Measures execution time in milliseconds using wall clock.long
Measures real CPU execution time in milliseconds.
-
Constructor Details
-
Microprofiler
public Microprofiler()
-
-
Method Details
-
measureUserCpuTime
Measures real CPU execution time in milliseconds.- Returns:
- real CPU execution time in milliseconds or -1 if it is not possible to calculate
-
measureRealTime
Measures execution time in milliseconds using wall clock. It is not precise time since CPU may perform context switch to another thread but the clock will still be ticking. -
measureExecutionTime
Chooses the best available on current JVM way to measure the execution time and returns it in milliseconds. -
gcCount
public static long gcCount()
-