diff options
author | lloyd <[email protected]> | 2009-10-28 22:55:12 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-28 22:55:12 +0000 |
commit | 3623be3fd05d890309cc3da4b3a1e319e357df65 (patch) | |
tree | 34ca43fcf8a7007cc01a3919f63e9ab6763cb673 /checks/bench.h | |
parent | fc1e61500e77fcabe67e6d2607810c1ba071bbdd (diff) | |
parent | 9462f875b13a321f42a127166d49670ca04afcde (diff) |
propagate from branch 'net.randombit.botan.1_8' (head 3158f8272a3582dd44dfb771665eb71f7d005339)
to branch 'net.randombit.botan' (head bf629b13dd132b263e76a72b7eca0f7e4ab19aac)
Diffstat (limited to 'checks/bench.h')
-rw-r--r-- | checks/bench.h | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/checks/bench.h b/checks/bench.h index 07d67e0d1..835db0101 100644 --- a/checks/bench.h +++ b/checks/bench.h @@ -1,37 +1,18 @@ -#ifndef BOTAN_BENCHMARCH_H__ -#define BOTAN_BENCHMARCH_H__ +#ifndef BOTAN_CHECK_BENCHMARK_H__ +#define BOTAN_CHECK_BENCHMARK_H__ #include <botan/rng.h> #include <string> -#include <map> -#include <set> -#include "timer.h" -#include <iostream> +void benchmark(Botan::RandomNumberGenerator& rng, + double seconds); -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(const std::string&, Botan::RandomNumberGenerator&, - bool html, double seconds); +bool bench_algo(const std::string& algo_name, + Botan::RandomNumberGenerator& rng, + double seconds); void bench_pk(Botan::RandomNumberGenerator&, - const std::string&, bool html, double seconds); - -u32bit bench_algo(const std::string&, - Botan::RandomNumberGenerator&, - double); + const std::string&, double seconds); #endif |