[Swift-commit] r4322 - trunk/libexec/log-processing

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Fri Apr 8 14:57:29 CDT 2011


Author: wozniak
Date: 2011-04-08 14:57:29 -0500 (Fri, 08 Apr 2011)
New Revision: 4322

Modified:
   trunk/libexec/log-processing/cpu-jobs-complete.pl
Log:
Extract Coasters jobs completed over time numbers


Modified: trunk/libexec/log-processing/cpu-jobs-complete.pl
===================================================================
--- trunk/libexec/log-processing/cpu-jobs-complete.pl	2011-04-08 19:38:03 UTC (rev 4321)
+++ trunk/libexec/log-processing/cpu-jobs-complete.pl	2011-04-08 19:57:29 UTC (rev 4322)
@@ -5,26 +5,22 @@
 #                  timestamp ... Cpu ... submitting ...
 #                  timestamp ... Cpu ... jobTerminated ...
 #         where timestamp is a number
-# OUTPUT: lines formatted as "timestamp load"
-#         where timestamp and load are numbers
+# OUTPUT: lines formatted as "timestamp count"
+#         where timestamp and count are numbers,
+#          count being the number of completed jobs at that point
 
-$time = 0.0;
-$load = 0;
+$count = 0;
 
 sub report() {
     @tokens = split;
-    printf("$tokens[0] $load\n");
+    printf("$tokens[0] $count\n");
 }
 
 while (<STDIN>) {
     if (/Cpu/) {
-	if (/submitting/) {
-	    $load++;
+	if (/jobTerminated/) {
+	    $count++;
 	    report;
 	}
-	elsif (/jobTerminated/) {
-	    $load--;
-	    report;
-	}
     }
 }




More information about the Swift-commit mailing list