From 15ff120b027ea4ebac4791e234f03fb561c0735b Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 2 Jan 2014 14:51:21 +0100 Subject: Update testlib selftest units MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jędrzej Nowacki Reviewed-by: Jason McDonald --- tests/auto/testlib/selftests/tst_selftests.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') 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.) { -- cgit v1.2.3