Skip to content

Commit

Permalink
nas: Simplify report extraction
Browse files Browse the repository at this point in the history
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
  • Loading branch information
gormanm committed May 27, 2019
1 parent 0bf7aca commit f443cf4
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 158 deletions.
11 changes: 1 addition & 10 deletions bin/lib/MMTests/ExtractFreqminecommon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,8 @@ sub uniq {

sub extractReport() {
my ($self, $reportDir) = @_;
my @threads;

my @files = <$reportDir/freqmine-*-1.log>;
foreach my $file (@files) {
my @elements = split (/-/, $file);
my $thr = $elements[-2];
$thr =~ s/.log//;
push @threads, $thr;
}
my @threads = $self->discover_scaling_parameters($reportDir, "freqmine-", "-1.log");

@threads = sort {$a <=> $b} @threads;
foreach my $nthr (@threads) {
my @files = <$reportDir/freqmine-$nthr-*.log>;

Expand Down
14 changes: 3 additions & 11 deletions bin/lib/MMTests/ExtractFutexwait.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,8 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;
my ($tp, $name);
my @threads;

my @files = <$reportDir/futexwait-*-1.log>;
foreach my $file (@files) {
my @elements = split (/-/, $file);
my $thr = $elements[-2];
$thr =~ s/.log//;
push @threads, $thr;
}

@threads = sort {$a <=> $b} @threads;
my @threads = $self->discover_scaling_parameters($reportDir, "futexwait-", "-1.log");;
foreach my $nthr (@threads) {
my @files = <$reportDir/futexwait-$nthr-*.log>;

Expand All @@ -48,3 +38,5 @@ sub extractReport() {
}
}
}

1;
10 changes: 1 addition & 9 deletions bin/lib/MMTests/ExtractHackbench.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,8 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;
my ($user, $system, $elapsed, $cpu);

my @files = <$reportDir/hackbench-*-1>;
my @groups;
foreach my $file (@files) {
my @split = split /-/, $file;
push @groups, $split[-2];
}
@groups = sort { $a <=> $b} @groups;

my @groups = $self->discover_scaling_parameters($reportDir, "hackbench-", "-1");
foreach my $group (@groups) {
my $nr_samples = 0;
foreach my $file (<$reportDir/hackbench-$group-*>) {
Expand Down
10 changes: 1 addition & 9 deletions bin/lib/MMTests/ExtractLkpthroughput.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,7 @@ sub extractReport() {
$self->{_Workloads} = \@workloads;
close(INPUT);

my @threads;
my @files = <$reportDir/lkp-*-1.log>;
foreach my $file (@files) {
my @elements = split (/-/, $file);
my $thr = $elements[-2];
$thr =~ s/.log//;
push @threads, $thr;
}
@threads = sort {$a <=> $b} @threads;
my @threads = $self->discover_scaling_parameters($reportDir, "lkp-", "-1.log");
@threads = uniq(@threads);

foreach my $nthr (@threads) {
Expand Down
9 changes: 1 addition & 8 deletions bin/lib/MMTests/ExtractMicrotput.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;
my ($user, $system, $elapsed, $cpu);

my @files = <$reportDir/microtput-*-1>;
my @threads;
foreach my $file (@files) {
my @split = split /-/, $file;
push @threads, $split[-2];
}
@threads = sort { $a <=> $b} @threads;
my @threads = $self->discover_scaling_parameters($reportDir, "microtput-", "-1");

foreach my $thread (@threads) {
my $nr_samples = 0;
Expand Down
9 changes: 1 addition & 8 deletions bin/lib/MMTests/ExtractMutilate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ sub new() {
sub extractReport() {
my ($self, $reportDir) = @_;

my @files = <$reportDir/mutilate-*-1.log>;
my @clients;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-2];
}
@clients = sort { $a <=> $b } @clients;
my @clients = $self->discover_scaling_parameters($reportDir, "mutilate-", "-1.log");

foreach my $client (@clients) {
my $iteration = 1;
Expand Down
5 changes: 0 additions & 5 deletions bin/lib/MMTests/ExtractNastime.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;
$reportDir =~ s/mpitime/mpi/;
$reportDir =~ s/omptime/omp/;
$reportDir =~ s/mpi-([a-z][a-z])time/mpi-\1/;
$reportDir =~ s/omp-([a-z][a-z])time/omp-\1/;

my @kernels = $self->discover_scaling_parameters($reportDir, "", ".log.1");

foreach my $kernel (@kernels) {
Expand Down
9 changes: 1 addition & 8 deletions bin/lib/MMTests/ExtractPistress.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,7 @@ my %status_code = (

sub extractReport() {
my ($self, $reportDir) = @_;

my @clients;
foreach my $file (<$reportDir/pistress-*.log>) {
my @split = split /-/, $file;
$split[-1] =~ s/.log.*//;
push @clients, $split[-1];
}
@clients = sort { $a <=> $b} @clients;
my @clients = $self->discover_scaling_parameters($reportDir, "pistress-", ".log");

foreach my $client (@clients) {
my $file = "$reportDir/pistress-$client.status";
Expand Down
10 changes: 1 addition & 9 deletions bin/lib/MMTests/ExtractRedis.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,7 @@ sub initialise() {
sub extractReport() {
my ($self, $reportDir) = @_;

my @clients;
my @files = <$reportDir/redis-*-1.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-2] =~ s/.log//;
push @clients, $split[-2];
}
@clients = sort { $a <=> $b } @clients;

my @clients = $self->discover_scaling_parameters($reportDir, "redis-", "-1.log");
foreach my $client (@clients) {
my $iteration = 1;
foreach my $file (<$reportDir/redis-$client-*.log>) {
Expand Down
14 changes: 1 addition & 13 deletions bin/lib/MMTests/ExtractSchbench.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,7 @@ sub extractReport() {
my ($self, $reportDir) = @_;
my @ratioops;

my @files = <$reportDir/schbench-*.log>;
my @groups;

foreach my $file (@files) {
my @split = split /-/, $file;
my $group = $split[-1];

$group =~ s/([0-9]+).*/$1/;

push @groups, $group
}
@groups = sort { $a <=> $b } @groups;

my @groups = $self->discover_scaling_parameters($reportDir, "schbench-", ".log");
foreach my $group (@groups) {
open(INPUT, "$reportDir/schbench-$group.log") || die("Failed to open $group\n");
while (<INPUT>) {
Expand Down
9 changes: 1 addition & 8 deletions bin/lib/MMTests/ExtractSiege.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;
my @clients;
my @files = <$reportDir/siege-*-1.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-2];
}
@clients = sort { $a <=> $b } @clients;
my @clients = $self->discover_scaling_parameters($reportDir, "siege-", "-1.log");

foreach my $client (@clients) {
my @files = <$reportDir/siege-$client-*.log>;
Expand Down
9 changes: 1 addition & 8 deletions bin/lib/MMTests/ExtractStressng.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;

my @files = <$reportDir/stressng-*-1.log>;
my @clients;
foreach my $file (@files) {
my @split = split /-/, $file;
push @clients, $split[-2];
}
@clients = sort { $a <=> $b } @clients;
my @clients = $self->discover_scaling_parameters($reportDir, "stressng-", "-1.log");

foreach my $client (@clients) {
foreach my $file (<$reportDir/stressng-$client-*>) {
Expand Down
11 changes: 1 addition & 10 deletions bin/lib/MMTests/ExtractThpfioscale.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,8 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;

my @ops;
my @clients;
my @files = <$reportDir/threads-*.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-1];
}
@clients = sort { $a <=> $b } @clients;

my @clients = $self->discover_scaling_parameters($reportDir, "threads-", ".log");

foreach my $client (@clients) {
my $faults = 0;
Expand Down
11 changes: 1 addition & 10 deletions bin/lib/MMTests/ExtractThpscale.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,8 @@ sub initialise() {

sub extractReport() {
my ($self, $reportDir) = @_;

my @ops;
my @clients;
my @files = <$reportDir/threads-*.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-1];
}
@clients = sort { $a <=> $b } @clients;

my @clients = $self->discover_scaling_parameters($reportDir, "threads-", ".log");

foreach my $client (@clients) {
my $faults = 0;
Expand Down
12 changes: 1 addition & 11 deletions bin/lib/MMTests/ExtractTlbflush.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,12 @@ sub initialise() {
sub extractReport() {
my ($self, $reportDir) = @_;

my @ops;
my @clients;
my @files = <$reportDir/tlbflush-*.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-1];
}
@clients = sort { $a <=> $b } @clients;

my @clients = $self->discover_scaling_parameters($reportDir, "tlbflush-", ".log");
foreach my $client (@clients) {
my $iteration = 0;

my $file = "$reportDir/tlbflush-$client.log";
open(INPUT, $file) || die("Failed to open $file\n");
my ($user, $sys, $records);
while (<INPUT>) {
if ($_ =~ /.*, cost ([0-9]*)ns.*/) {
$self->addData("nsec-$client", ++$iteration, $1);
Expand Down
10 changes: 1 addition & 9 deletions bin/lib/MMTests/ExtractWptlbflush.pm
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ sub initialise() {
sub extractReport() {
my ($self, $reportDir) = @_;

my @ops;
my @clients;
my @files = <$reportDir/wp-tlbflush-*.log>;
foreach my $file (@files) {
my @split = split /-/, $file;
$split[-1] =~ s/.log//;
push @clients, $split[-1];
}
@clients = sort { $a <=> $b } @clients;
my @clients = $self->discover_scaling_parameters($reportDir, "wp-tlbflush-", ".log");

foreach my $client (@clients) {
my $file = "$reportDir/wp-tlbflush-$client.log";
Expand Down
14 changes: 2 additions & 12 deletions compare-kernels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -541,16 +541,6 @@ for SUBREPORT in $(run_report_name $KERNEL_BASE); do
cache-mmtests.sh compare-mmtests.pl -d . -b johnripper -a exectime -n $KERNEL_LIST $FORMAT_CMD
echo
;;
loopdd)
echo $SUBREPORT Throughput
eval $COMPARE_CMD
echo
echo $SUBREPORT DD-Time
eval $COMPARE_CMD --sub-heading ddtime
echo
echo $SUBREPORT CPU-Time
eval $COMPARE_CMD --sub-heading elapsed
;;
monitor)
echo No meaningful extraction script for monitor
echo
Expand All @@ -560,7 +550,7 @@ for SUBREPORT in $(run_report_name $KERNEL_BASE); do
cache-mmtests.sh compare-mmtests.pl -d . -b $SUBREPORT -n $KERNEL_LIST $FORMAT_CMD
echo
echo $SUBREPORT Wall Time
cache-mmtests.sh compare-mmtests.pl -d . -b ${SUBREPORT}time -n $KERNEL_LIST $FORMAT_CMD
cache-mmtests.sh compare-mmtests.pl -d . -b ${SUBREPORT} -a time -n $KERNEL_LIST $FORMAT_CMD
echo
;;
netpipe)
Expand Down Expand Up @@ -665,7 +655,7 @@ for SUBREPORT in $(run_report_name $KERNEL_BASE); do
$COMPARE_CMD
echo
echo $SUBREPORT Throughput
cache-mmtests.sh compare-mmtests.pl -d . -b xfsiothroughput -n $KERNEL_LIST $FORMAT_CMD
cache-mmtests.sh compare-mmtests.pl -d . -b xfsio -a throughput -n $KERNEL_LIST $FORMAT_CMD
echo
echo $SUBREPORT Ops
cache-mmtests.sh compare-mmtests.pl -d . -b xfsio -a ops -n $KERNEL_LIST $FORMAT_CMD
Expand Down

0 comments on commit f443cf4

Please sign in to comment.