[BROKEN] Adapt existing benchmarks to CA

This commit is contained in:
Steven Roose 2019-03-19 20:47:21 +00:00
parent 703db5b42f
commit f4553d4b6d
No known key found for this signature in database
GPG key ID: 7FC91380BB4CE800
4 changed files with 24 additions and 8 deletions

View file

@ -45,11 +45,12 @@ static void CCheckQueueSpeedPrevectorJob(benchmark::State& state)
// Make insecure_rand here so that each iteration is identical.
FastRandomContext insecure_rand(true);
CCheckQueueControl<PrevectorJob> control(&queue);
std::vector<std::vector<PrevectorJob>> vBatches(BATCHES);
std::vector<std::vector<PrevectorJob*>> vBatches(BATCHES);
for (auto& vChecks : vBatches) {
vChecks.reserve(BATCH_SIZE);
for (size_t x = 0; x < BATCH_SIZE; ++x)
vChecks.emplace_back(insecure_rand);
for (size_t x = 0; x < BATCH_SIZE; ++x) {
vChecks.emplace_back(new PrevectorJob(insecure_rand));
}
control.Add(vChecks);
}
// control waits for completion by RAII, but