aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/benchmark/benchmark.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/benchmark/benchmark.cpp b/src/benchmark/benchmark.cpp
index 0c6dcdfe9..4325af61e 100644
--- a/src/benchmark/benchmark.cpp
+++ b/src/benchmark/benchmark.cpp
@@ -35,7 +35,7 @@ std::pair<u32bit, u64bit> bench_buf_comp(BufferedComputation* buf_comp,
nanoseconds_used = timer.clock() - start;
}
- return std::make_pair(reps * buf_len, nanoseconds_used);
+ return std::make_pair(reps, nanoseconds_used);
}
/**
@@ -62,7 +62,7 @@ bench_block_cipher(BlockCipher* block_cipher,
nanoseconds_used = timer.clock() - start;
}
- return std::make_pair(reps * buf_len, nanoseconds_used);
+ return std::make_pair(reps, nanoseconds_used);
}
/**
@@ -85,7 +85,7 @@ bench_stream_cipher(StreamCipher* stream_cipher,
nanoseconds_used = timer.clock() - start;
}
- return std::make_pair(reps * buf_len, nanoseconds_used);
+ return std::make_pair(reps, nanoseconds_used);
}
/**
@@ -175,7 +175,7 @@ algorithm_benchmark(const std::string& name,
/* 953.67 == 1000 * 1000 * 1000 / 1024 / 1024 - the conversion
factor from bytes per nanosecond to mebibytes per second.
*/
- double speed = (953.67 * results.first) / results.second;
+ double speed = (953.67 * buf.size() * results.first) / results.second;
all_results[provider] = speed;
}
}