diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2022-06-28 09:54:51 -0700 |
---|---|---|
committer | Clark Boylan <clark.boylan@gmail.com> | 2022-06-28 09:54:51 -0700 |
commit | c6737ced67c6aba846e3d104fa63bc80cefed435 (patch) | |
tree | 1c93c0b2bccbde20a05b79e30e87e2cea12462a0 /zuul | |
parent | 6b167dd2f17d49dafec1a9756b04494ea77eea7d (diff) | |
download | zuul-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.py | 4 |
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) |