test: Use ECC_Context helper in bench and fuzz tests

This commit is contained in:
Ryan Ofsky 2024-05-07 08:54:19 -04:00 committed by TheCharlatan
parent 538fedde1d
commit 28905c1a64
No known key found for this signature in database
GPG key ID: 9B79B45691DB4173
15 changed files with 15 additions and 25 deletions

View file

@ -25,7 +25,7 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
// We shouldn't ever be running with the checkqueue on a single core machine.
if (GetNumCores() <= 1) return;
ECC_Start();
ECC_Context ecc_context{};
struct PrevectorJob {
prevector<PREVECTOR_SIZE, uint8_t> p;
@ -62,6 +62,5 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::Bench& bench)
// it is done explicitly here for clarity
control.Wait();
});
ECC_Stop();
}
BENCHMARK(CCheckQueueSpeedPrevectorJob, benchmark::PriorityLevel::HIGH);