From 8bbbdebbb5b84c693c5387bd8eb1f9f60d2667c2 Mon Sep 17 00:00:00 2001 From: jd-13 Date: Mon, 17 Apr 2023 21:09:13 +0100 Subject: [PATCH] Update performance tests --- WECore/Tests/PerformanceTests.cpp | 52 ------------------------------- 1 file changed, 52 deletions(-) diff --git a/WECore/Tests/PerformanceTests.cpp b/WECore/Tests/PerformanceTests.cpp index 41578500..cae67cdd 100644 --- a/WECore/Tests/PerformanceTests.cpp +++ b/WECore/Tests/PerformanceTests.cpp @@ -28,7 +28,6 @@ #include #include "CarveDSP/CarveDSPUnit.h" -#include "MONSTRFilters/MONSTRCrossover.h" #include "SongbirdFilters/SongbirdFilterModule.h" @@ -154,57 +153,6 @@ SCENARIO("Performance: CarveDSPUnit, 100 buffers of 1024 samples each") { } } -SCENARIO("Performance: MONSTRCrossover, 100 buffers of 1024 samples each") { - GIVEN("A MONSTRCrossover and a buffer of samples") { - - const int NUM_BUFFERS {100}; - std::vector leftBuffer(1024); - std::vector rightBuffer(1024); - WECore::MONSTR::MONSTRCrossover mCrossover; - - // set the performance limits - Limits mLimits{1.0, 0.8, 0.08}; - - // store the execution time for each buffer - std::vector executionTimes; - - WHEN("The samples are processed") { - // turn the crossover on - mCrossover.setIsActive(0, true); - mCrossover.setIsActive(1, true); - mCrossover.setIsActive(2, true); - - for (int nbuf {0}; nbuf < NUM_BUFFERS; nbuf++) { - - // fill the buffer with a sine wave - int iii {0}; - std::generate(leftBuffer.begin(), leftBuffer.end(), [&iii]{ return std::sin(iii++); }); - rightBuffer = leftBuffer; - - - // do processing - const clock_t startTime {clock()}; - mCrossover.Process2in2out(&leftBuffer[0], &rightBuffer[0], leftBuffer.size()); - const clock_t endTime {clock()}; - - // calculate the execution time - const double CLOCKS_PER_MICROSEC {static_cast(CLOCKS_PER_SEC) / 1000}; - const double executionTime {static_cast(endTime - startTime) / CLOCKS_PER_MICROSEC}; - executionTimes.push_back(executionTime); - CHECK(executionTime < mLimits.INDIVIDUAL); - } - - THEN("The average and variance are within limits") { - Stats mStats = calcAverageAndDeviation(executionTimes); - CHECK(mStats.average < mLimits.AVERAGE); - CHECK(mStats.deviation < mLimits.DEVIATION); - - appendToResultsFile(mStats, Catch::getResultCapture().getCurrentTestName()); - } - } - } -} - SCENARIO("Performance: SongbirdFilterModule (blend mode), 100 buffers of 1024 samples each") { GIVEN("A SongbirdFilterModule and a buffer of samples") {