diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-17 20:50:34 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-05-17 20:50:34 +0000 |
commit | b7490436eb2a51749a33fe7c395bc961cfc633b4 (patch) | |
tree | e4c7b8015eeed3a681ffa946755799594f5fa827 /rdiff-backup/rdiff_backup/profiled_rdb.py | |
parent | c3beb4a2425f1ca142f1c773ca8205399b48c993 (diff) | |
download | rdiff-backup-b7490436eb2a51749a33fe7c395bc961cfc633b4.tar.gz |
Added some error checking code, and a wrapper for easier profiling
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@89 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/profiled_rdb.py')
-rwxr-xr-x | rdiff-backup/rdiff_backup/profiled_rdb.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/profiled_rdb.py b/rdiff-backup/rdiff_backup/profiled_rdb.py new file mode 100755 index 0000000..91810c2 --- /dev/null +++ b/rdiff-backup/rdiff_backup/profiled_rdb.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python + +"""Run rdiff-backup with profiling on + +Same as rdiff-backup but runs profiler, and prints profiling +statistics afterwards. + +""" + +__no_execute__ = 1 +execfile("main.py") +import profile, pstats +profile.run("Globals.Main.Main(%s)" % repr(sys.argv[1:]), "profile-output") +p = pstats.Stats("profile-output") +p.sort_stats('time') +p.print_stats(20) +p.sort_stats('cumulative') +p.print_stats(20) + + |