diff options
Diffstat (limited to 'checks/pk_bench.cpp')
-rw-r--r-- | checks/pk_bench.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp index fcc0a0f13..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, |