I have a software benchmark which is quite noisy. I am trying to for the bugs which are causing the noise, and I need to be able to measure it somehow.
The benchmark is comprised of a number of subbenchmarks, for example:
"3d-cube": 31.56884765625,
"3d-morph": 21.89599609375,
"3d-raytrace": 51.802978515625,
"access-binary-trees": 15.09521484375,
"access-fannkuch": 45.578857421875,
"access-nbody": 8.651123046875,
The times are in milliseconds. The times typically vary between runs. For example, on my machine, the "3d-cube" benchmark tends to take around 35ms, but I've seen it go as high as 44ms, and 31ms (above) is uncharacteristically low.
My aim is to change the benchmark so that minor improvements to the run-time can be visible in a benchmark result. What I need is a number that tells me whether I have reduced the "variability" of the benchmark.
My own solution
I run it the benchmark 1000 times, the took the sum of the differences between each subbenchmark's mean and its actual run-times. In pseudo-code:
v = 0
for s in subbenchmarks:
x = mean of all iterations of s
for i in iteration
v += absolute_value(results[s][i] - x)
I'm sure this isn't statistically valid (having asked someone), but what is a "correct" way of measuring this "variability" so that I can reduce it.