aboutsummaryrefslogtreecommitdiffstats
path: root/checks/pk_bench.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'checks/pk_bench.cpp')
-rw-r--r--checks/pk_bench.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index 88a72afde..9a94d8474 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -53,9 +53,23 @@ using namespace Botan;
#include <fstream>
#include <string>
#include <memory>
+#include <set>
namespace {
+class Benchmark_Report
+ {
+ public:
+ void report(const std::string& name, Timer timer)
+ {
+ std::cout << name << " " << timer << std::endl;
+ data[name].insert(timer);
+ }
+
+ private:
+ std::map<std::string, std::set<Timer> > data;
+ };
+
void benchmark_enc_dec(PK_Encryptor& enc, PK_Decryptor& dec,
Timer& enc_timer, Timer& dec_timer,
RandomNumberGenerator& rng,
@@ -603,7 +617,7 @@ void benchmark_elg(RandomNumberGenerator& rng,
}
void bench_pk(RandomNumberGenerator& rng,
- const std::string& algo, bool, double seconds)
+ const std::string& algo, double seconds)
{
/*
There is some strangeness going on here. It looks like algorithms