@ VisibleForTesting static long calculateTargetReps ( long reps , long nanos , long targetNanos , double gaussian ) { double targetReps = ( ( ( double ) reps ) / nanos ) * targetNanos ; return Math . max ( 1L , Math . round ( ( gaussian * ( targetReps / 5 ) ) + targetReps ) ) ; }
Returns a random number of reps based on a normal distribution around the estimated number of reps for the timing interval . The distribution used has a standard deviation of one fifth of the estimated number of reps .