From 7f701e51eef9a837b6ab2c8f40596523e25c9580 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 26 Sep 2016 09:33:52 -0400 Subject: [PATCH] Switch to storing run wall time in runs database This commit uses an option added in the subunit2sql 1.8.0 release to set the run_time column in the runs table to be the wall time for the subunit stream, in other words the stop time of the last test - the start time of the first test. By default subunit2sql stores the sum of all the individual test run times as the value for the run_time column which is of questionable value for doing analysis. By switching what we store for this value in the infra DB hopefully this data will be of more use to people. Change-Id: Ief4cfa91f9661444b3680b428da0a3c4ca5dedd0 --- files/subunit-gearman-worker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/subunit-gearman-worker.py b/files/subunit-gearman-worker.py index 60ff2ec..3c7001f 100644 --- a/files/subunit-gearman-worker.py +++ b/files/subunit-gearman-worker.py @@ -91,7 +91,8 @@ class SubunitRetriever(object): logging.debug('Converting Subunit V2 stream: %s to SQL' % subunit_v2) stream = read_subunit.ReadSubunit(subunit_v2, - targets=self.extra_targets) + targets=self.extra_targets, + use_wall_time=True) results = stream.get_results() start_time = sorted( [results[x]['start_time'] for x in results if x != 'run_time'])[0]