diff options
| author | Michael E Brown <michael_e_brown@dell.com> | 2007-10-19 09:51:40 -0500 |
|---|---|---|
| committer | Michael E Brown <michael_e_brown@dell.com> | 2007-10-19 09:51:40 -0500 |
| commit | fac86d8d2248caa4faf8571b03e3424fe1956d3d (patch) | |
| tree | 71bc94631e83752a75ebbcc978ce225e08b29130 | |
| parent | c88affbda3b76dba5def41df927940d4110afed9 (diff) | |
| download | mock-fac86d8d2248caa4faf8571b03e3424fe1956d3d.tar.gz mock-fac86d8d2248caa4faf8571b03e3424fe1956d3d.tar.xz mock-fac86d8d2248caa4faf8571b03e3424fe1956d3d.zip | |
print pretty time statistics after build done.
| -rwxr-xr-x | src/mock.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mock.py b/src/mock.py index d07ebe2..dd904ab 100755 --- a/src/mock.py +++ b/src/mock.py @@ -24,6 +24,7 @@ import logging.config import os import os.path import sys +import time from optparse import OptionParser # all of the variables below are substituted by the build system @@ -248,12 +249,14 @@ def main(): for hdr in mock.util.yieldSrpmHeaders(srpms): pass for srpm in srpms: + start = time.time() if config_opts['clean'] and chroot.state() != "clean": chroot.clean() chroot.init() chroot.build(srpm, timeout=config_opts['rpmbuild_timeout']) - - log.info("Results and/or logs in: %s" % chroot.resultdir) + elapsed = time.time() - start + log.info("Done(%s) %s minutes %s seconds" % (srpm, elapsed/60, elapsed%60)) + log.info("Results and/or logs in: %s" % chroot.resultdir) else: log.error("Unknown command specified: %s" % args[0]) |
