]> AND Private Git Repository - loba.git/blobdiff - extract.pl
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Add ability to delay the beginning of computations.
[loba.git] / extract.pl
index fa393b97c7ef17058fd7215fc6b8cf2047dd644e..0521e942065ccfffb3dd1ab7b9d9a231f3ce15ac 100755 (executable)
@@ -17,17 +17,12 @@ while (<>) {
     chomp;
     if (s{^(?:\[0\.0+\] )?\[main/INFO\] \| bookkeeping\.*: }{}) {
         $bookkeeping = $_ eq "on";
     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) {
         if ($bookkeeping) {
-            $finalmatch = $prefix .
-                'Final load after (\d+):(\d+) iterations: ' . $pflt .
-                ' ; expected: ' . $pflt;
-            $plainmatch = $prefix .
-                '\((\d+):(\d+)\) current load: ' . $pflt .
-                ' ; expected: ' . $pflt;
-        } else {
-            $finalmatch = $prefix .
-                'Final load after (\d+) iterations: ' . $pflt;
-            $plainmatch = $prefix . '\((\d+)\) current load: ' . $pflt;
+            $finalmatch = $finalmatch . ' ; expected: ' . $pflt;
+            $plainmatch = $plainmatch . ' ; expected: ' . $pflt;
         }
         if (0) {
             print STDERR "BOOKKEEPING: \"$_\" ($bookkeeping)\n";
         }
         if (0) {
             print STDERR "BOOKKEEPING: \"$_\" ($bookkeeping)\n";
@@ -37,29 +32,22 @@ while (<>) {
         }
     }
     next if not defined $bookkeeping;
         }
     }
     next if not defined $bookkeeping;
-    if (m{$plainmatch}) {
+    if (m{$plainmatch} or m{$finalmatch}) {
         my $host = $1;
         my $host = $1;
-        my $data;
+        my $data = {
+            time     => $2,
+            lb       => $3,
+            comp     => $4,
+            load     => $5,
+        };
         if ($bookkeeping) {
         if ($bookkeeping) {
-            $data = {
-                time     => $2,
-                lb       => $3,
-                comp     => $4,
-                load     => $5,
-                expected => $6,
-            };
+            $data->{expected} = $6;
         } else {
         } else {
-            $data = {
-                time     => $2,
-                lb       => $3,
-                comp     => $3,
-                load     => $4,
-                expected => $4,
-            };
+            $data->{expected} = $data->{load};
         }
         }
-#        print STDERR "PUSH $host $data->{time} $data->{load} (plain)\n";
+#        print STDERR "PUSH $host $data->{time} $data->{load} (plain/final)\n";
         push @{$alldata{$host}}, $data;
         push @{$alldata{$host}}, $data;
-    } if (m{$initmatch}) {
+    } elsif (m{$initmatch}) {
         my $host = $1;
         my $data = {
             time     => $2,
         my $host = $1;
         my $data = {
             time     => $2,
@@ -70,28 +58,6 @@ while (<>) {
         };
 #        print STDERR "PUSH $host $data->{time} $data->{load} (init)\n";
         push @{$alldata{$host}}, $data;
         };
 #        print STDERR "PUSH $host $data->{time} $data->{load} (init)\n";
         push @{$alldata{$host}}, $data;
-    } elsif (m{$finalmatch}) {
-        my $host = $1;
-        my $data;
-        if ($bookkeeping) {
-            $data = {
-                time     => $2,
-                lb       => $3,
-                comp     => $4,
-                load     => $5,
-                expected => $6,
-            };
-         } else {
-             $data = {
-                time     => $2,
-                lb       => $3,
-                comp     => $3,
-                load     => $4,
-                expected => $4,
-             };
-         }
-#        print STDERR "PUSH $host $data->{time} $data->{load} (final)\n";
-        push @{$alldata{$host}}, $data;
     }
 }
 
     }
 }