aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-10-22 18:47:13 +0000
committerlloyd <[email protected]>2008-10-22 18:47:13 +0000
commit44130a97960477d0cfe482773bcc01b99c76c54e (patch)
tree48c8bb1d22b7a4eb28f1f8d5acc8626ed070db76
parentbdf4f43368b697edc95a53530d6f3f9919d3b9ce (diff)
Use heap rather than stack for data input. Increase size to 128k
-rw-r--r--checks/bench.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/checks/bench.cpp b/checks/bench.cpp
index 81a6a96d1..93620224a 100644
--- a/checks/bench.cpp
+++ b/checks/bench.cpp
@@ -31,17 +31,17 @@ double bench_filter(std::string name, Botan::Filter* filter,
{
Botan::Pipe pipe(filter, new BitBucket);
- pipe.start_msg();
+ Botan::SecureVector<byte> buf(128 * 1024);
+ rng.randomize(buf, buf.size());
- byte buf[32 * 1024];
- Timer timer(name, sizeof(buf));
+ pipe.start_msg();
- rng.randomize(buf, sizeof(buf));
+ Timer timer(name, buf.size());
while(timer.seconds() < seconds)
{
timer.start();
- pipe.write(buf, sizeof(buf));
+ pipe.write(buf, buf.size());
timer.stop();
}