Runs warmups until the maximum number of warmups is done,
or the running times have stabilized. After that, it runs
the tests the specified number of times and collects
the results using an aggregate function.
Stabilization is detected by tracking the running times
for which there may have been and those for which there
was no garbage collection.
When either of the two running times stabilizes, we consider
the JVM warmed up for the snippet.
We do this by registering on GC events instead of invoking
Platform.collectGarbage, since usually the time to invoke
the snippet is less than the time to perform full GC, and
most triggered GC cycles are fast because they collect only
the young generation.
Runs warmups until the maximum number of warmups is done, or the running times have stabilized. After that, it runs the tests the specified number of times and collects the results using an
aggregate
function.Stabilization is detected by tracking the running times for which there may have been and those for which there was no garbage collection. When either of the two running times stabilizes, we consider the JVM warmed up for the snippet.
We do this by registering on GC events instead of invoking
Platform.collectGarbage
, since usually the time to invoke the snippet is less than the time to perform full GC, and most triggered GC cycles are fast because they collect only the young generation.