blob: 0208a854ddf5d7011c2766d2a029c465fd04eba0 [file] [log] [blame]
This test verifies PerfTestRunner.computeStatistics(), including: min, max, median, mean, variance, and stdev.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Ensure no latent divide by 0's for an odd number of elements.
data = [0,0,0,0,0]
PASS stats.min is 0
PASS stats.max is 0
PASS stats.median is 0
PASS stats.mean is 0
PASS stats.variance is 0
PASS stats.stdev is 0
This test will catch if any order dependencies in the data, such as
needing to be numerically sorted, are not resolved by the algorithm.
This variant covers an odd number of elements.
data = [1,10,2,20,5]
PASS stats.min is 1
PASS stats.max is 20
PASS stats.median is 5
PASS stats.mean is 7.6
PASS stats.min is 1
PASS stats.max is 20
PASS stats.median is 5
PASS stats.mean is 7.6
PASS stats.variance is within 0.0001 of 60.3
PASS stats.stdev is within 0.0001 of 7.76530746332687
This test will catch if any order dependencies in the data, such as
needing to be numerically sorted, are not resolved by the algorithm.
This variant covers an odd number of elements, and negative values.
data = [-1,-10,-2,-20,-5]
PASS stats.min is -20
PASS stats.max is -1
PASS stats.median is -5
PASS stats.mean is -7.6
PASS stats.min is -20
PASS stats.max is -1
PASS stats.median is -5
PASS stats.mean is -7.6
PASS stats.variance is within 0.0001 of 60.3
PASS stats.stdev is within 0.0001 of 7.76530746332687
Ensure no latent divide by 0's for an even number of elements.
data = [0,0,0,0]
PASS stats.median is 0
This test verifies that median is handled correctly for
an even number of elements.
data = [1,10,2,20,5,6]
PASS stats.median is 5.5
PASS stats.median is 5.5
This test verifies that median is handled correctly for
an even number of elements, including negative numbers.
data = [-1,-10,-2,-20,-5,-6]
PASS stats.median is -5.5
PASS stats.median is -5.5
PASS successfullyParsed is true
TEST COMPLETE