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

wozniak at ci.uchicago.edu wozniak at ci.uchicago.edu
Fri Apr 8 15:52:54 CDT 2011


Author: wozniak
Date: 2011-04-08 15:52:54 -0500 (Fri, 08 Apr 2011)
New Revision: 4326

Added:
   trunk/libexec/log-processing/block-level.pl
   trunk/libexec/log-processing/blocks.cfg
Log:
New Coasters block allocation plot


Added: trunk/libexec/log-processing/block-level.pl
===================================================================
--- trunk/libexec/log-processing/block-level.pl	                        (rev 0)
+++ trunk/libexec/log-processing/block-level.pl	2011-04-08 20:52:54 UTC (rev 4326)
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+# Accumulate the load level at each point in time
+# INPUT:  A Swift log file with Coasters messages:
+#                  timestamp ... Block Starting block: workers=24 ...
+#                  timestamp ... Block Shutting down ... (24x ...
+#         where timestamp is a number
+# OUTPUT: lines formatted as "timestamp level"
+#         where timestamp and load are numbers,
+#          level being the number of Coasters Cpus available
+
+$level = 0;
+
+sub report() {
+    @tokens = split;
+    printf("$tokens[0] $level\n");
+}
+
+while (<STDIN>) {
+    if (/Block/) {
+	if (/Block Starting block:/) {
+	    /workers=(\d*)/;
+	    report;
+	    $level += $1;
+	    report;
+	}
+	if (/Block Shutting down block/) {
+	    /\((\d*)x/;
+	    report;
+	    $level -= $1;
+	    report;
+	}
+    }
+}


Property changes on: trunk/libexec/log-processing/block-level.pl
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/libexec/log-processing/blocks.cfg
===================================================================
--- trunk/libexec/log-processing/blocks.cfg	                        (rev 0)
+++ trunk/libexec/log-processing/blocks.cfg	2011-04-08 20:52:54 UTC (rev 4326)
@@ -0,0 +1,6 @@
+
+xlabel = time
+ylabel = allocation size
+
+# shape.blocks.data = none
+label.blocks.data = cores




More information about the Swift-commit mailing list