From a1f3f7da8d06671d9b719cc9f83a67cdf2b1c815 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 25 Apr 2016 10:53:41 +0200 Subject: convwatch: let's print some timestamps Change-Id: I455017ad3458362b78d6306886344ccec3c9247b --- bin/convwatch.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bin/convwatch.py') diff --git a/bin/convwatch.py b/bin/convwatch.py index 9d055115d324..749bdb360806 100644 --- a/bin/convwatch.py +++ b/bin/convwatch.py @@ -13,6 +13,7 @@ import subprocess import sys import time import uuid +import datetime try: from urllib.parse import quote except ImportError: @@ -282,7 +283,8 @@ class LoadPrintFileTest: self.file = file self.prtsuffix = prtsuffix def run(self, xContext): - print("Loading document: " + self.file) + start = datetime.datetime.now() + print("Time: " + str(start) + " Loading document: " + self.file) xDoc = None try: url = "file://" + quote(self.file) @@ -291,7 +293,8 @@ class LoadPrintFileTest: finally: if xDoc: xDoc.close(True) - print("...done with: " + self.file) + end = datetime.datetime.now() + print("...done with: " + self.file + " in: " + str(end - start)) def runLoadPrintFileTests(opts, dirs, suffix, reference): if reference: @@ -392,7 +395,7 @@ def checkTools(): sys.exit(1) if __name__ == "__main__": -# checkTools() + checkTools() (opts,args) = parseArgs(sys.argv) if len(args) == 0: usage() -- cgit