diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2012-07-09 16:48:48 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2012-07-09 16:48:48 -0400 |
commit | 189346c45a4907479f083c854469a896dcf3b581 (patch) | |
tree | b3a06941343342553447f7444c043bbc9324d56b /admin/benchmarks.py | |
parent | b64220472e0a126e84b59b431dd02604d6458695 (diff) | |
download | passlib-189346c45a4907479f083c854469a896dcf3b581.tar.gz |
_CryptConfig now pre-calculates default scheme for each category, checks against deprecated list (closes issue 39)
* also added some unittests to catch 3 cases covered in issue 39,
and some others as well.
Diffstat (limited to 'admin/benchmarks.py')
-rw-r--r-- | admin/benchmarks.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/admin/benchmarks.py b/admin/benchmarks.py index 4e4f9bb..4687f37 100644 --- a/admin/benchmarks.py +++ b/admin/benchmarks.py @@ -6,6 +6,7 @@ parsing was being sped up. it could definitely be improved. #============================================================================= # init script env #============================================================================= +import re import os, sys root = os.path.join(os.path.dirname(__file__), os.path.pardir) sys.path.insert(0, os.curdir) @@ -266,7 +267,8 @@ def main(*args): source = globals() if args: orig = source - source = dict((k,orig[k]) for k in orig if k in args) + source = dict((k,orig[k]) for k in orig + if any(re.match(arg, k) for arg in args)) helper = benchmark.run(source, maxtime=2, bestof=3) for name, secs, precision in helper: print_("%-50s %9s (%d)" % (name, benchmark.pptime(secs), precision)) |