From afebe00667816041a2f0be7db968b99efa123688 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Sat, 23 Dec 2023 13:49:48 +0000 Subject: [PATCH] Allow 80% of ideal in ThreadPerformanceTest --- tests/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/main.cpp b/tests/main.cpp index 4386891b..47a970d2 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -401,7 +401,7 @@ TEST_CASE( "ThreadPerformanceTest" ) auto overhead = 100 - ( 100 * ( eff / refEff ) ); std::cout << "0x Buffer Efficiency: " << eff << "% (-" << overhead << "%)" << std::endl; - REQUIRE( eff >= refEff * 0.25 * 0.90 ); + REQUIRE( eff >= refEff * 0.25 * 0.80 ); // Tick the circuit with 1 thread, and check that no more ticks occurred if ( std::thread::hardware_concurrency() < 1 ) @@ -420,7 +420,7 @@ TEST_CASE( "ThreadPerformanceTest" ) overhead = 100 - ( 100 * ( eff / refEff ) ); std::cout << "1x Buffer Efficiency: " << eff << "% (-" << overhead << "%)" << std::endl; - REQUIRE( eff >= refEff * 0.25 * 0.90 ); + REQUIRE( eff >= refEff * 0.25 * 0.80 ); // Tick the circuit with 2 threads, and check that more ticks occurred if ( std::thread::hardware_concurrency() < 2 ) @@ -439,7 +439,7 @@ TEST_CASE( "ThreadPerformanceTest" ) overhead = 100 - ( 100 * ( eff / refEff ) ); std::cout << "2x Buffer Efficiency: " << eff << "% (-" << overhead << "%)" << std::endl; - REQUIRE( eff >= refEff * 0.5 * 0.90 ); + REQUIRE( eff >= refEff * 0.5 * 0.80 ); // Tick the circuit with 3 threads, and check that more ticks occurred if ( std::thread::hardware_concurrency() < 6 ) @@ -458,7 +458,7 @@ TEST_CASE( "ThreadPerformanceTest" ) overhead = 100 - ( 100 * ( eff / refEff ) ); std::cout << "3x Buffer Efficiency: " << eff << "% (-" << overhead << "%)" << std::endl; - REQUIRE( eff >= refEff * 0.75 * 0.90 ); + REQUIRE( eff >= refEff * 0.75 * 0.80 ); // Tick the circuit with 4 threads, and check that more ticks occurred if ( std::thread::hardware_concurrency() < 8 ) @@ -477,7 +477,7 @@ TEST_CASE( "ThreadPerformanceTest" ) overhead = 100 - ( 100 * ( eff / refEff ) ); std::cout << "4x Buffer Efficiency: " << eff << "% (-" << overhead << "%)" << std::endl; - REQUIRE( eff >= refEff * 0.90 ); + REQUIRE( eff >= refEff * 0.80 ); } TEST_CASE( "StopAutoTickRegressionTest" )