Browse Source

Try a little harder to recover from malformed logs

Ian Goldberg 1 year ago
parent
commit
f40fbc0dd4
1 changed files with 15 additions and 0 deletions
  1. 15 0
      Docker/parse_logs

+ 15 - 0
Docker/parse_logs

@@ -95,6 +95,9 @@ sub parse_2P_read {
     my @online_kib = ();
     while(<>) {
         last if /===== End/;
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/===== P([012]) output/) {
             $who = $1;
@@ -127,6 +130,9 @@ sub parse_2P_write_preproc {
     my @preproc_kib = ();
     while(<>) {
         last if /===== End/;
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/===== P([012]) output/) {
             $who = $1;
@@ -157,6 +163,9 @@ sub parse_2P_write_online {
     my @online_kib = ();
     while(<>) {
         last if /===== End/;
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/===== P([012]) output/) {
             $who = $1;
@@ -185,6 +194,9 @@ sub parse_3P_preproc {
             next;
         }
         last if /===== End/;
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/WallClockTime: (\d+\.?\d*)/) {
             $preproc_s[$who] = $1;
@@ -213,6 +225,9 @@ sub parse_3P_online {
     my @readwrite_kib = ();
     while(<>) {
         last if /===== End/;
+        # Try to recover from a malformed log
+        last if /^Max GB:/;
+        # It was too malformed
         die "Malformed log" if /===== Running/;
         if (/===== P([012]) output/) {
             $who = $1;