Open GoogleCodeExporter opened 9 years ago
Sorry for letting this one slip through the cracks. The issue is that some
method is getting JIT'd in the middle of the timing process. I'm writing up
the docs on how to deal with this type of thing, but here are the high-level
steps for dealing with this.
1) run with --verbose to see _what_ is getting JIT'd. Given your code, I'd
guess that it's probably something random and has nothing to do with your
benchmark. :-(
2) Random or not, the way to deal with this is to adjust the timing interval
and the warmup. If something called by your benchmark code is being JIT'd, you
need more warmup. This is done by setting the
"instrument.micro.options.warmup" configuration property. It takes a value
like "5s" or "100ms". Either set the value in ~/.caliper/config.properties or
using the -C flag. If it's a random method, I've found that decreasing the
timing interval (instrument.micro.options.timingInterval, same value format)
and the warmup is usually the way to go. Essentially, the JVM is running for
_so_ long that thing that get invoked very, very infrequently happen to get
JIT'd, so you just make the JVM run for less time total. Run your benchmark
with --print-config to see what the current values are and adjust them from
there.
HTH.
Original comment by gak@google.com
on 17 Apr 2013 at 6:32
Original issue reported on code.google.com by
agrothberg
on 8 Apr 2013 at 12:03