Mercurial > piecrust2
diff piecrust/baking/worker.py @ 1019:bd544b65cfad
bake: More detailed stats, and fix a problem with some error reporting.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 29 Nov 2017 21:36:11 -0800 |
parents | fa489c5e829e |
children |
line wrap: on
line diff
--- a/piecrust/baking/worker.py Wed Nov 29 21:35:49 2017 -0800 +++ b/piecrust/baking/worker.py Wed Nov 29 21:36:11 2017 -0800 @@ -43,8 +43,8 @@ app.env.fs_cache_only_for_main_page = True stats = app.env.stats - stats.registerTimer("BakeWorker_%d_Total" % self.wid) - stats.registerTimer("BakeWorkerInit") + stats.registerTimer("Worker_%d_Total" % self.wid) + stats.registerTimer("Worker_%d_Init" % self.wid) self.app = app self.stats = stats @@ -74,7 +74,8 @@ stats.registerTimer("PipelineJobs_%s" % pname, raise_if_registered=False) - stats.stepTimerSince("BakeWorkerInit", self._work_start_time) + stats.stepTimerSince( + "Worker_%d_Init" % self.wid, self._work_start_time) def process(self, job): source_name, item_spec = job['job_spec'] @@ -98,7 +99,7 @@ def getStats(self): stats = self.app.env.stats - stats.stepTimerSince("BakeWorker_%d_Total" % self.wid, + stats.stepTimerSince("Worker_%d_Total" % self.wid, self._work_start_time) return stats