]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
Executive: Previous duration estimator: use overall time, not sum of steps
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 8 Jul 2016 18:30:58 +0000 (19:30 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 6 Sep 2016 11:30:34 +0000 (12:30 +0100)
Some jobs runs steps in parallel.  Do not add up all the individual
step durations.  Instead, calculate the duration as the time between
first step start and last step finish.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Osstest/Executive.pm

index 7e31b35a01880398f068e38ced22c5de66e790cd..7b4030723c1c6a81353bb53d9cd73b11b05589d5 100644 (file)
@@ -1068,7 +1068,7 @@ END
               FROM steps
              WHERE flight=? AND job=?
         )
-            SELECT sum(finished-started)
+            SELECT max(finished)-min(started)
                 AS duration
               FROM tsteps
              WHERE step != 'ts-hosts-allocate'