]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Capture time that a build takes.
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Mar 2010 13:49:58 +0000 (14:49 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Mar 2010 13:49:58 +0000 (14:49 +0100)
naoki/chroot.py

index 73c29dacd577ebc5b6e639d763ee4b996176f132..e6b5fdc588bee66f4e4009a6ab74ab09d6191c2f 100644 (file)
@@ -5,6 +5,7 @@ import logging
 import os
 import random
 import stat
+import time
 
 import backend
 import util
@@ -258,12 +259,18 @@ class Environment(object):
        def build(self):
                self.package.download()
 
+               # Save start time
+               time_start = time.time()
+
                try:
                        self.make("package")
                except Error:
                        if config["cleanup_on_failure"]:
                                self.clean()
                        raise
+               finally:
+                       time_end = time.time()
+                       self.log.debug("Package build took %.2fs" % (time_end - time_start))
 
                if config["cleanup_on_success"]:
                        self.clean()