diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-12-25 07:19:22 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-12-25 07:19:22 +0000 |
commit | 4c1147a3dc9d31f85f4f04df3cfbcf4864d0c483 (patch) | |
tree | b38db9f657b0cfd30159adfef2c2e79ba8bb4e3b | |
parent | 6d8cf78ca473a39852d26b1d115df60c14543cc8 (diff) | |
download | rdiff-backup-4c1147a3dc9d31f85f4f04df3cfbcf4864d0c483.tar.gz |
Minor cleanup
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@721 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rwxr-xr-x | rdiff-backup/rdiff-backup-statistics | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/rdiff-backup/rdiff-backup-statistics b/rdiff-backup/rdiff-backup-statistics index b289fe7..be5fc0e 100755 --- a/rdiff-backup/rdiff-backup-statistics +++ b/rdiff-backup/rdiff-backup-statistics @@ -1,4 +1,5 @@ #!/usr/bin/python +# rdiff-backup-statistics -- Summarize rdiff-backup statistics files # # Copyright 2005 Dean Gaudet, Ben Escoto # @@ -19,11 +20,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 # USA - -import profile, pstats import os, sys, re, getopt -from rdiff_backup import connection, regress, rpath, Globals, restore, Time, lazy - +from rdiff_backup import connection, regress, rpath, Globals, restore, \ + Time, lazy begin_time = None # Parse statistics at or after this time... end_time = None # ... and at or before this time (epoch seconds) @@ -34,7 +33,7 @@ def parse_args(): try: optlist, args = getopt.getopt(sys.argv[1:], "", ["begin-time=", "end-time=", "minimum-ratio="]) except getopt.error, e: - sys.exit("Bad commandline options: " + str(e)) + sys.exit("Bad command line: " + str(e)) for opt, arg in optlist: if opt == "--begin-time": begin_time = Time.genstrtotime(arg) @@ -43,8 +42,8 @@ def parse_args(): else: assert 0 if len(args) != 1: - sys.exit("Usage: %s --begin-time <time> --end-time <time> <backup-dir>" - % (sys.argv[0],)) + sys.exit("Usage: %s --begin-time <time> --end-time <time> " + "--minimum-ratio <float> <backup-dir>" % (sys.argv[0],)) Globals.rbdir = rpath.RPath(Globals.local_connection, os.path.join(args[0], 'rdiff-backup-data')) @@ -402,6 +401,7 @@ class ReadlineBuffer: self.buffer.extend(split[1:]) else: self.at_end = 1 + def sum_fst(rp_pairs): """Add the file statistics given as list of (session_rp, file_rp) pairs""" n = len(rp_pairs) |