X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/cd83ecda6b4c36b2face63122fe1e09d6ffa2fe0..c36d15fa17cb573585e0b3841b89420b56bf18a4:/extract.pl?ds=sidebyside diff --git a/extract.pl b/extract.pl index 0521e94..a174a9e 100755 --- a/extract.pl +++ b/extract.pl @@ -7,31 +7,14 @@ my $bookkeeping; my $flt = '[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?'; my $pflt = "($flt)"; my $prefix = '^\[([^: ]+)(?::loba:\(\d+\))? ' . $pflt . '\] \[proc/INFO\] '; -my $initmatch = $prefix . 'Initial load: ' . $pflt . ''; -my $finalmatch; -my $plainmatch; +my $initmatch = $prefix . 'Initial load: ' . $pflt; +my $finalmatch = $prefix . 'Final load after (\d+):(\d+) iterations: ' . $pflt;; +my $plainmatch = $prefix . '\((\d+):(\d+)\) current load: ' . $pflt; my %alldata = (); while (<>) { chomp; - if (s{^(?:\[0\.0+\] )?\[main/INFO\] \| bookkeeping\.*: }{}) { - $bookkeeping = $_ eq "on"; - $finalmatch = $prefix . - 'Final load after (\d+):(\d+) iterations: ' . $pflt; - $plainmatch = $prefix . '\((\d+):(\d+)\) current load: ' . $pflt; - if ($bookkeeping) { - $finalmatch = $finalmatch . ' ; expected: ' . $pflt; - $plainmatch = $plainmatch . ' ; expected: ' . $pflt; - } - if (0) { - print STDERR "BOOKKEEPING: \"$_\" ($bookkeeping)\n"; - print STDERR "INITMATCH..: \"$initmatch\"\n"; - print STDERR "PLAINMATCH.: \"$plainmatch\"\n"; - print STDERR "FINALMATCH.: \"$finalmatch\"\n"; - } - } - next if not defined $bookkeeping; if (m{$plainmatch} or m{$finalmatch}) { my $host = $1; my $data = { @@ -40,11 +23,6 @@ while (<>) { comp => $4, load => $5, }; - if ($bookkeeping) { - $data->{expected} = $6; - } else { - $data->{expected} = $data->{load}; - } # print STDERR "PUSH $host $data->{time} $data->{load} (plain/final)\n"; push @{$alldata{$host}}, $data; } elsif (m{$initmatch}) { @@ -54,7 +32,6 @@ while (<>) { lb => 0, comp => 0, load => $3, - expected => $3, }; # print STDERR "PUSH $host $data->{time} $data->{load} (init)\n"; push @{$alldata{$host}}, $data;