|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 33/60] sg-report-job-history: Use fork-based parallelism
For now, one child per job (for all branches). This is already a
speedup.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
sg-report-job-history | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/sg-report-job-history b/sg-report-job-history
index 424053f1..384a7670 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -26,11 +26,13 @@ use IO::Handle;
use HTML::Entities;
use Osstest::Executive;
+use Osstest::HistoryReport;
our (@blessings,@branches);
our $limit= 100;
our $htmlout;
our $flight;
+our $maxjobs=10;
our $job;
open DEBUG, ">/dev/null";
@@ -38,7 +40,7 @@ open DEBUG, ">/dev/null";
while (@ARGV && $ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
last if m/^--?$/;
- if (m/^--(job|flight)\=(.*)$/) {
+ if (m/^--(job|flight|maxjobs)\=(.*)$/) {
$$1= $2;
} elsif (m/^--(limit)\=([1-9]\d*)$/) {
$$1= $2;
@@ -300,6 +302,9 @@ sub processjob ($) {
processjobbranch($j,$_) foreach @branches;
}
-db_begin_work($dbh_tests, []);
-db_readonly_report();
-foreach my $j (@jobs) { processjob($j); }
+parallel_by_fork('sg-report-job-history', $maxjobs, \@jobs, sub {
+ my ($j) = @_;
+ db_retry($dbh_tests, [], sub {
+ processjob($j);
+ });
+});
--
2.11.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |