From 7eba4b4cdd8530530b8708947cf7a2799f7cb55d Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 3 Jan 2009 21:35:59 +0000 Subject: 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 --- rdiff-backup/rdiff_backup/statistics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rdiff-backup/rdiff_backup/statistics.py') 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) -- cgit v1.2.1