diff options
author | drebs <drebs@leap.se> | 2015-06-04 11:21:40 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2015-06-04 11:21:40 -0300 |
commit | 293c71080e9a21115d248e46d1a706c53cc8ee37 (patch) | |
tree | 3353672f1f770ef5f5c87ea7e3e27debe737a50b /scripts/profiling/storage/profile-format.py | |
parent | fa7708e256ba56cd1e9913993d68611b4ae95824 (diff) | |
parent | 9fb1c47ca7da06d6feef6846b812aec28128ed78 (diff) |
Merge tag '0.7.0'
Tag version 0.7.0.
Conflicts:
CHANGELOG
client/src/leap/soledad/client/__init__.py
client/src/leap/soledad/client/sqlcipher.py
client/src/leap/soledad/client/target.py
server/pkg/soledad-server
Diffstat (limited to 'scripts/profiling/storage/profile-format.py')
-rw-r--r-- | scripts/profiling/storage/profile-format.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/profiling/storage/profile-format.py b/scripts/profiling/storage/profile-format.py new file mode 100644 index 00000000..262a52ab --- /dev/null +++ b/scripts/profiling/storage/profile-format.py @@ -0,0 +1,29 @@ +#!/usr/bin/python + +import argparse +import pstats + + +def parse_args(): + # parse command line + parser = argparse.ArgumentParser() + parser.add_argument( + '-f', dest='statsfiles', action='append', required=True, + help='a stats file') + args = parser.parse_args() + return args.statsfiles + + +def format_stats(statsfiles): + for f in statsfiles: + ps = pstats.Stats(f) + ps.strip_dirs() + ps.sort_stats('time') + ps.print_stats() + ps.sort_stats('cumulative') + ps.print_stats() + + +if __name__ == '__main__': + statsfiles = parse_args() + format_stats(statsfiles) |