* hydra: added index, actual build time (buildstep with same outpath, so without deps) of the build
This commit is contained in:
parent
14a1e6db61
commit
68c60b4c66
|
@ -58,8 +58,14 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
|||
, system => $build->system
|
||||
, finished => 1
|
||||
, buildstatus => 0
|
||||
, 'me.id' => { '<=' => $build->id }
|
||||
}
|
||||
, { join => "actualBuildStep"
|
||||
, "+select" => ["actualBuildStep.stoptime - actualBuildStep.starttime"]
|
||||
, "+as" => ["actualBuildTime"]
|
||||
, order_by => "id DESC"
|
||||
, rows => 50
|
||||
}
|
||||
, { order_by => "id DESC", rows => 100 }
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
@ -217,6 +217,14 @@ __PACKAGE__->belongs_to(
|
|||
{ id => "id" },
|
||||
);
|
||||
|
||||
__PACKAGE__->has_one(
|
||||
"actualBuildStep",
|
||||
"Hydra::Schema::BuildSteps",
|
||||
{ 'foreign.outpath' => 'self.outpath'
|
||||
, 'foreign.build' => 'self.id'
|
||||
},
|
||||
);
|
||||
|
||||
sub addSequence {
|
||||
my $hydradbi = getHydraDBPath;
|
||||
if ($hydradbi =~ m/^dbi:Pg/) {
|
||||
|
|
|
@ -430,7 +430,7 @@
|
|||
var d = [];
|
||||
var ids = [];
|
||||
[% FOREACH prevbuild IN prevBuilds %][% IF prevbuild.resultInfo.starttime != 0 %]
|
||||
d.push([[% prevbuild.resultInfo.starttime * 1000 %],[% prevbuild.resultInfo.stoptime - prevbuild.resultInfo.starttime %]]);
|
||||
d.push([[% prevbuild.resultInfo.starttime * 1000 %],[% prevbuild.get_column('actualBuildTime') %]]);
|
||||
ids[[% prevbuild.resultInfo.starttime * 1000 %]] = [% prevbuild.id %] ;
|
||||
[% END %][% END %]
|
||||
|
||||
|
|
|
@ -431,6 +431,7 @@ create index IndexBuildSchedulingInfoOnBuild on BuildSchedulingInfo(id); -- idem
|
|||
create index IndexBuildStepsOnBuild on BuildSteps(build);
|
||||
create index IndexBuildStepsOnDrvpathTypeBusyStatus on BuildSteps(drvpath, type, busy, status);
|
||||
create index IndexBuildStepsOnOutpath on BuildSteps(outpath);
|
||||
create index IndexBuildStepsOnOutpathBuild on BuildSteps (outpath, build);
|
||||
create index IndexBuildsOnFinished on Builds(finished);
|
||||
create index IndexBuildsOnIsCurrent on Builds(isCurrent);
|
||||
create index IndexBuildsOnJob on Builds(project, jobset, job);
|
||||
|
|
Loading…
Reference in a new issue