summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup/statistics.py
diff options
context:
space:
mode:
authorowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 21:35:59 +0000
committerowsla <owsla@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2009-01-03 21:35:59 +0000
commit7eba4b4cdd8530530b8708947cf7a2799f7cb55d (patch)
treeea6a763257ca75d1f91af06620ec75153df4d671 /rdiff-backup/rdiff_backup/statistics.py
parente389196e3426dde8957d38b4da8135489f80ae6a (diff)
downloadrdiff-backup-7eba4b4cdd8530530b8708947cf7a2799f7cb55d.tar.gz
Take start and end times from same system so that the elapsed time printed in
the statistics is not affected by time zone. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@994 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/statistics.py')
-rw-r--r--rdiff-backup/rdiff_backup/statistics.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/statistics.py b/rdiff-backup/rdiff_backup/statistics.py
index b16fb12..0bdd439 100644
--- a/rdiff-backup/rdiff_backup/statistics.py
+++ b/rdiff-backup/rdiff_backup/statistics.py
@@ -333,21 +333,21 @@ def process_increment(inc_rorp):
"""Add statistics of increment rp incrp if there is active statfile"""
if _active_statfileobj: _active_statfileobj.add_increment(inc_rorp)
-def write_active_statfileobj():
+def write_active_statfileobj(end_time = None):
"""Write active StatFileObj object to session statistics file"""
global _active_statfileobj
assert _active_statfileobj
rp_base = Globals.rbdir.append("session_statistics")
session_stats_rp = increment.get_inc(rp_base, 'data', Time.curtime)
- _active_statfileobj.finish()
+ _active_statfileobj.finish(end_time)
_active_statfileobj.write_stats_to_rp(session_stats_rp)
_active_statfileobj = None
-def print_active_stats():
+def print_active_stats(end_time = None):
"""Print statistics of active statobj to stdout and log"""
global _active_statfileobj
assert _active_statfileobj
- _active_statfileobj.finish()
+ _active_statfileobj.finish(end_time)
statmsg = _active_statfileobj.get_stats_logstring("Session statistics")
log.Log.log_to_file(statmsg)
Globals.client_conn.sys.stdout.write(statmsg)