diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-01-02 14:51:21 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-07 19:21:34 +0100 |
commit | 15ff120b027ea4ebac4791e234f03fb561c0735b (patch) | |
tree | 0cae5532f74db656505c1620f449c90249f0822e /tests | |
parent | 592d79fc83f68401da5cac438667faf1e8bfa014 (diff) |
Update testlib selftest units
The units that were supposed to have variance were completely off in the
test leading to all benchmarks with slight variance being completely
flaky.
Change-Id: Ib76593813974adee462b3f03be9370d2248d770c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/testlib/selftests/tst_selftests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/testlib/selftests/tst_selftests.cpp b/tests/auto/testlib/selftests/tst_selftests.cpp index 1a8e336b55..7b578e28ea 100644 --- a/tests/auto/testlib/selftests/tst_selftests.cpp +++ b/tests/auto/testlib/selftests/tst_selftests.cpp @@ -99,13 +99,13 @@ inline bool qCompare // Now check the value. Some variance is allowed, and how much depends on // the measured unit. qreal variance = 0.; - if (r1.unit == "msec") { + if (r1.unit == "msecs" || r1.unit == "WalltimeMilliseconds") { variance = 0.1; } else if (r1.unit == "instruction reads") { variance = 0.001; } - else if (r1.unit == "ticks") { + else if (r1.unit == "CPU ticks" || r1.unit == "CPUTicks") { variance = 0.001; } if (variance == 0.) { |