summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZooko O'Whielacronx <zooko@zooko.com>2012-07-12 10:11:48 -0300
committerZooko O'Whielacronx <zooko@zooko.com>2012-07-12 10:11:48 -0300
commitf52f6ab9cc1ea47f28ec1a820185feba4e3d7c3b (patch)
tree9c600b28679bdb556695b9fd20a3483505685106
parentf6b2d0ad7f1e5ef3614650c841c58c3e938c51e6 (diff)
don't try to benchmark ciphers or hashes on small inputs
The machines finish those tasks faster than we can reliably measure how long it takes them also stop using print_bench_footer, since we're moving toward being able to do benchmarks independently of pyutil.
-rw-r--r--src/pycryptopp/bench/bench_ciphers.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/pycryptopp/bench/bench_ciphers.py b/src/pycryptopp/bench/bench_ciphers.py
index c8ee6b9..bb9a160 100644
--- a/src/pycryptopp/bench/bench_ciphers.py
+++ b/src/pycryptopp/bench/bench_ciphers.py
@@ -1,6 +1,6 @@
from pycryptopp.cipher import aes, xsalsa20
-from common import insecurerandstr, rep_bench, print_bench_footer
+from common import insecurerandstr, rep_bench
UNITS_PER_SECOND = 10**9
@@ -29,16 +29,13 @@ def bench_ciphers(MAXTIME):
ob = BenchCrypt(klass, keysize)
print ob
for (legend, size) in [
- ("small (%d B)", 1000),
- ("medium (%d B)", 10000),
- ("large (%d B)", 100000),
+ ("large (%d B)", 10**7),
]:
print legend % size
rep_bench(ob.crypt, size, UNITS_PER_SECOND=UNITS_PER_SECOND, MAXTIME=MAXTIME, MAXREPS=100, initfunc=ob.crypt_init)
print
print "nanoseconds per byte crypted"
- print_bench_footer(UNITS_PER_SECOND=UNITS_PER_SECOND)
print
def bench(MAXTIME=10.0):