diff options
author | lloyd <[email protected]> | 2008-09-05 12:46:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-09-05 12:46:18 +0000 |
commit | e292d9c1263fc74c26b26b9bd6f879ab25cc19ee (patch) | |
tree | 73953a1061223fc65e9236d232caf04bbc5a1aa4 /checks/bench.h | |
parent | a8973ceb0c0f70e67e30b1c36e4ed833bc158445 (diff) |
Use the Timer class for all benchmarking
Diffstat (limited to 'checks/bench.h')
-rw-r--r-- | checks/bench.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/checks/bench.h b/checks/bench.h index e101acdc2..f58ce3250 100644 --- a/checks/bench.h +++ b/checks/bench.h @@ -4,6 +4,25 @@ #include <botan/rng.h> #include <string> +#include <map> +#include <set> +#include "timer.h" + +#include <iostream> + +class Benchmark_Report + { + public: + void report(const std::string& name, Timer timer) + { + std::cout << name << " " << timer << "\n"; + data[name].insert(timer); + } + + private: + std::map<std::string, std::set<Timer> > data; + }; + void benchmark(const std::string&, Botan::RandomNumberGenerator&, bool html, double seconds); |