summaryrefslogtreecommitdiff
path: root/zuul
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2022-06-28 09:54:51 -0700
committerClark Boylan <clark.boylan@gmail.com>2022-06-28 09:54:51 -0700
commitc6737ced67c6aba846e3d104fa63bc80cefed435 (patch)
tree1c93c0b2bccbde20a05b79e30e87e2cea12462a0 /zuul
parent6b167dd2f17d49dafec1a9756b04494ea77eea7d (diff)
downloadzuul-c6737ced67c6aba846e3d104fa63bc80cefed435.tar.gz
Report timing info for POST_FAILURE and TIMED_OUT builds
We previously only reported statsd timing info for SUCCESS and FAILURE builds. But it would be useful to get info for POST_FAILURE and TIMED_OUT builds as well. In particular with POST_FAILURE builds we can track how long they are running before they fail. Change-Id: I2fe443ac2f69f40b7419e5280a38958d3ac7c080
Diffstat (limited to 'zuul')
-rw-r--r--zuul/scheduler.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/zuul/scheduler.py b/zuul/scheduler.py
index bfabcecc2..b436c356f 100644
--- a/zuul/scheduler.py
+++ b/zuul/scheduler.py
@@ -844,7 +844,9 @@ class Scheduler(threading.Thread):
jobkey,
'RETRY' if build.result is None else build.result
)
- if build.result in ['SUCCESS', 'FAILURE'] and build.start_time:
+ results_with_runtime = ['SUCCESS', 'FAILURE',
+ 'POST_FAILURE', 'TIMED_OUT']
+ if build.result in results_with_runtime and build.start_time:
dt = (build.end_time - build.start_time) * 1000
self.statsd.timing(key, dt)
self.statsd.incr(key)