summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-07-13 11:37:38 +0000
committerHolger Levsen <holger@layer-acht.org>2015-07-23 11:42:21 +0200
commite56eb4a29b940a18b3bb5e2890c9db57024bec7f (patch)
tree156b36160a886b0040b4b429879c36107d004459 /bin
parentfac086f4263eb29eed4b425bc98a35b693c79958 (diff)
downloadjenkins.debian.net-e56eb4a29b940a18b3bb5e2890c9db57024bec7f.tar.xz
reproducible: _common.py: print starting, ending and execution time
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index c3388bef..7b3ed417 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -14,6 +14,7 @@ import re
import sys
import json
import errno
+import atexit
import sqlite3
import logging
import argparse
@@ -83,6 +84,8 @@ sh = logging.StreamHandler()
sh.setFormatter(logging.Formatter('%(levelname)s: %(message)s'))
log.addHandler(sh)
+started_at = datetime.now()
+log.info('Starting at %s', started_at)
log.debug("BIN_PATH:\t" + BIN_PATH)
log.debug("BASE:\t\t" + BASE)
@@ -219,6 +222,12 @@ for issue in filtered_issues:
filter_html += ' or <a href="' + REPRODUCIBLE_URL + ISSUES_URI + '/$suite/' + issue + '_issue.html">' + issue + '</a>'
+@atexit.register
+def print_time():
+ log.info('Finished at %s, took: %s', datetime.now(),
+ datetime.now()-started_at)
+
+
def print_critical_message(msg):
print('\n\n\n')
try: