added check for SetComplexityN (#248)

This commit is contained in:
Ismael 2016-06-27 20:26:23 +02:00 committed by Dominic Hamon
parent a0783fd7f6
commit 885ca41cf8

View File

@ -234,6 +234,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
// Populate the accumulators.
for (const Run& run : reports) {
CHECK_GT(run.complexity_n, 0) << "Did you forget to call SetComplexityN?";
n.push_back(run.complexity_n);
real_time.push_back(run.real_accumulated_time / run.iterations);
cpu_time.push_back(run.cpu_accumulated_time / run.iterations);