Add test runtime metric

This commit is contained in:
David Dworken 2023-10-21 16:42:41 -07:00
parent 4e15bab9be
commit 3d4e48aabd
No known key found for this signature in database

View File

@ -59,6 +59,7 @@ func (eventHandler) Event(event testjson.TestEvent, execution *testjson.Executio
NUM_TEST_RETRIES[testIdentifier] += 1 NUM_TEST_RETRIES[testIdentifier] += 1
} }
if event.Action == testjson.ActionPass { if event.Action == testjson.ActionPass {
GLOBAL_STATSD.Distribution("test_runtime", event.Elapsed, []string{"test:" + testIdentifier, "os:" + runtime.GOOS}, 1.0)
GLOBAL_STATSD.Incr("test_status", []string{"result:passed", "test:" + testIdentifier, "os:" + runtime.GOOS}, 1.0) GLOBAL_STATSD.Incr("test_status", []string{"result:passed", "test:" + testIdentifier, "os:" + runtime.GOOS}, 1.0)
NUM_TEST_RETRIES[testIdentifier] += 1 NUM_TEST_RETRIES[testIdentifier] += 1
} }