From 6a0b9a3476807a1d9170d2ba331147cab472b9c2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 12 Dec 2014 17:20:50 +0100 Subject: [PATCH] hydra-build: Handle new trace messages Now build step duration no longer includes network overhead (i.e. time to copy closures to the build machine). --- src/script/hydra-build | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/script/hydra-build b/src/script/hydra-build index 9418f32b..26310d59 100755 --- a/src/script/hydra-build +++ b/src/script/hydra-build @@ -166,11 +166,28 @@ sub doBuild { }); } + elsif (/^@\s+build-remote-start\s+(\S+)\s+/) { + my $drvPathStep = $1; + txn_do($db, sub { + my $step = $build->buildsteps->find({stepnr => $buildSteps{$drvPathStep}}) or die; + $step->update({starttime => time}); + }); + } + + elsif (/^@\s+build-remote-done\s+(\S+)\s+/) { + my $drvPathStep = $1; + txn_do($db, sub { + my $step = $build->buildsteps->find({stepnr => $buildSteps{$drvPathStep}}) or die; + $step->update({stoptime => time}); + }); + } + elsif (/^@\s+build-succeeded\s+(\S+)\s+(\S+)$/) { my $drvPathStep = $1; txn_do($db, sub { my $step = $build->buildsteps->find({stepnr => $buildSteps{$drvPathStep}}) or die; $step->update({busy => 0, status => 0, stoptime => time}); + $step->update({stoptime => time}) unless defined $step->update; }); }