crosperf: replace statistics stdev with pstdev

Behavior and results of statistics.stdev(data) are slightly different from
numpy.std(data) with default "ddof".
The main difference is the divisor which is "N - 1" in stdev vs. "N" in
numpy.std. As a consequence stdev fails with "N=1".

The change replaces stdev with pstdev (population standard deviation)
which is equivalent to numpy.std with default arguments that we were
Added unittest with StdResult testing.

TEST=unittest and crosperf with one iteration passes.

Change-Id: I70c7105e6cabc27437504de16ea27afdd719e552
Reviewed-by: George Burgess <>
Tested-by: Denis Nikitin <>
Commit-Queue: Denis Nikitin <>
2 files changed