aboutsummaryrefslogtreecommitdiffstats
path: root/checks
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-13 15:27:56 +0000
committerlloyd <[email protected]>2006-08-13 15:27:56 +0000
commit671061b187e594f3ce969ee8f10fa45f4ff70ff1 (patch)
treea5acdf57b7c2bfe03146c8922384058499aac5fd /checks
parent25e64ec2aad7824fb1918d7722b1628386498a07 (diff)
Respect the --seconds command line argument with --bench-algo
Diffstat (limited to 'checks')
-rw-r--r--checks/bench.cpp4
-rw-r--r--checks/check.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp
index 377aa6d5a..4c7024731 100644
--- a/checks/bench.cpp
+++ b/checks/bench.cpp
@@ -149,7 +149,7 @@ void benchmark(const std::string& what, bool html, double seconds)
}
}
-u32bit bench_algo(const std::string& name)
+u32bit bench_algo(const std::string& name, double seconds)
{
try {
std::vector<algorithm> algos = get_algos();
@@ -158,7 +158,7 @@ u32bit bench_algo(const std::string& name)
{
if(algos[j].name == name)
{
- bench(algos[j].name, algos[j].filtername, false, 3.0,
+ bench(algos[j].name, algos[j].filtername, false, seconds,
algos[j].keylen, algos[j].ivlen);
return 1;
}
diff --git a/checks/check.cpp b/checks/check.cpp
index 6a7705090..0f6fc3c70 100644
--- a/checks/check.cpp
+++ b/checks/check.cpp
@@ -25,7 +25,7 @@ const std::string EXPECTED_FAIL_FILE = "checks/fail.dat";
void benchmark(const std::string&, bool html, double seconds);
void bench_pk(const std::string&, bool html, double seconds);
-u32bit bench_algo(const std::string&);
+u32bit bench_algo(const std::string&, double);
int validate();
void print_help();
@@ -62,7 +62,7 @@ int main(int argc, char* argv[])
if(opts.is_set("bench-algo"))
{
const std::string alg = opts.value("bench-algo");
- u32bit found = bench_algo(alg);
+ u32bit found = bench_algo(alg, seconds);
if(!found) // maybe it's a PK algorithm
bench_pk(alg, false, seconds);
}