slachiewicz / caliper

Automatically exported from code.google.com/p/caliper
Apache License 2.0
0 stars 0 forks source link

MicrobenchmarkWorker explodes on really micro benchmarks #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Attempt to time a task that does something extremely short (an increment)
2. Notice worker death
3.

What is the expected output? What do you see instead?

I expect to see a time of 0. I get worker death.

What version of the product are you using? On what operating system?

1.0.0-SNAPSHOT (built today) on OS-X

Please provide any additional information below.

Error is in MicrobenchmarkWorker#adjustRepCount: problem is if previousNanos is 
0, which happens on extremely short (or optimized out of existence) operations. 
 My suggestion is that you have a REPS_MIN value (you're checking for 100 
later, so that's a promising candidate), and if previousNanos <= 0, return 
REPS_MIN.

Original issue reported on code.google.com by Smokejum...@gmail.com on 30 Jan 2012 at 1:26

GoogleCodeExporter commented 9 years ago
Oh: the explicit error dropped into the eventLog is a divide by zero error, 
since previousNanos is zero.

Original comment by Smokejum...@gmail.com on 30 Jan 2012 at 1:26

GoogleCodeExporter commented 9 years ago
Thanks for catching this.  The fix sounds plausible.  REPS_MIN should probably 
actually come from the config file like everything else.

Original comment by kevinb@google.com on 8 Feb 2012 at 9:39

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 8 Feb 2012 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 1 Nov 2012 at 8:32

GoogleCodeExporter commented 9 years ago
This should be fixed for 1.0, but we still need a test.

Original comment by gak@google.com on 1 Nov 2012 at 8:59

GoogleCodeExporter commented 9 years ago

Original comment by gak@google.com on 11 Apr 2013 at 6:49