@@ -256,12 +256,12 @@ namespace PacedPollingTests
256256 }
257257 TEST_METHOD (PollDynamic)
258258 {
259- const uint32_t targetPid = 14580 ;
259+ const uint32_t targetPid = 12820 ;
260260 const auto recordingStart = 1s;
261- const auto recordingStop = 22s ;
261+ const auto recordingStop = 14s ;
262262
263263 const auto pipeName = R"( \\.\pipe\pm-poll-test-act)" s;
264- const auto etlName = " hea -win.etl" s;
264+ const auto etlName = " Heaven -win-vsync-2080ti .etl" s;
265265 const auto goldCsvPath = R"( ..\..\Tests\PacedGold\polled_gold.csv)" s;
266266 const auto outputBasePath = R"( PacedTest\Polled1\)" s;
267267 const auto toleranceFactor = 0.02 ;
@@ -341,8 +341,6 @@ namespace PacedPollingTests
341341 }
342342 };
343343
344- Run (1 );
345-
346344 // compare all runs against gold if exists
347345 if (std::filesystem::exists (goldCsvPath)) {
348346 std::vector<std::vector<MetricCompareResult>> allResults;
@@ -386,18 +384,27 @@ namespace PacedPollingTests
386384 }
387385 return nFail;
388386 };
387+ // first attempt to compare single run against gold
388+ Run (1 );
389389 DoComparison ();
390390 if (ValidateAndWriteAggregateResults () == 0 ) {
391391 Logger::WriteMessage (" One-shot success" );
392392 }
393393 else {
394- Run (9 );
394+ // first single run fails, run N times and see if enough pass to seem plausible
395+ allResults.clear ();
396+ const int nRuns = 9 ;
397+ Run (nRuns);
395398 DoComparison ();
396399 const auto nFail = ValidateAndWriteAggregateResults ();
397- Assert::IsTrue (nFail < 6 , std::format (L" Failed [{}] runs" , nFail).c_str ());
400+ Assert::IsTrue (nFail < (int )std::roundf (nRuns * 0 .667f ),
401+ std::format (L" Failed [{}] runs (of {})" , nFail, nRuns).c_str ());
402+ Logger::WriteMessage (std::format (L" Retry success (failed [{}] of [{}])" , nFail, nRuns).c_str ());
398403 }
399404 }
400405 else { // if gold doesn't exist, do cartesian product comparison of all
406+ const int nRuns = 9 ;
407+ Run (nRuns);
401408 std::vector<size_t > mismatchTotals (allRuns.size (), 0 );
402409 for (size_t iA = 0 ; iA < allRuns.size (); ++iA) {
403410 for (size_t iB = iA + 1 ; iB < allRuns.size (); ++iB) {
@@ -423,6 +430,9 @@ namespace PacedPollingTests
423430 for (size_t i = 0 ; i < mismatchTotals.size (); ++i) {
424431 aggWriter << std::make_tuple (i, mismatchTotals[i]);
425432 }
433+ // hardcode a fail because this execution path requires analysis and
434+ // selection of a gold result to lock in
435+ Assert::IsTrue (false , L" Run complete, analysis is required to select gold result." );
426436 }
427437 }
428438 };
0 commit comments