[Qa-jenkins-scm] [jenkins.debian.net] 02/03: reproducible: _common.py: print starting, ending and execution time

Holger Levsen holger at moszumanska.debian.org
Thu Jul 23 09:43:12 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit e56eb4a29b940a18b3bb5e2890c9db57024bec7f
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Mon Jul 13 11:37:38 2015 +0000

    reproducible: _common.py: print starting, ending and execution time
---
 bin/reproducible_common.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index c3388be..7b3ed41 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>'
 
 
+ at 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:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list