[Swift-commit] r3382 - branches/woz-01/libexec/log-processing
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Wed Jun 16 16:54:29 CDT 2010
Author: wozniak
Date: 2010-06-16 16:54:29 -0500 (Wed, 16 Jun 2010)
New Revision: 3382
Modified:
branches/woz-01/libexec/log-processing/coaster-block-timeline.plot
branches/woz-01/libexec/log-processing/extract-coaster-timeline
branches/woz-01/libexec/log-processing/makefile.coasters
Log:
Patches to plotting tools
Modified: branches/woz-01/libexec/log-processing/coaster-block-timeline.plot
===================================================================
--- branches/woz-01/libexec/log-processing/coaster-block-timeline.plot 2010-06-16 21:50:53 UTC (rev 3381)
+++ branches/woz-01/libexec/log-processing/coaster-block-timeline.plot 2010-06-16 21:54:29 UTC (rev 3382)
@@ -2,5 +2,8 @@
set output "coaster-block-timeline.png"
set title "Queued/Active Coaster Workers"
+
+set xlabel "seconds"
+
set style data steps
-plot "coaster-blocks.data" u 1:2 w steps title "Queued Workers", "coaster-blocks.data" u 1:3 w steps title "Running Workers"
\ No newline at end of file
+plot "coaster-blocks.data" u 1:2 w steps title "Queued Workers", "coaster-blocks.data" u 1:3 w steps title "Running Workers"
Modified: branches/woz-01/libexec/log-processing/extract-coaster-timeline
===================================================================
--- branches/woz-01/libexec/log-processing/extract-coaster-timeline 2010-06-16 21:50:53 UTC (rev 3381)
+++ branches/woz-01/libexec/log-processing/extract-coaster-timeline 2010-06-16 21:54:29 UTC (rev 3382)
@@ -1,30 +1,16 @@
#!/bin/bash
+set -x
+
LOG=$1
-grep "RemoteLogHandler BLOCK_.*" $LOG | iso-to-secs | normalise-event-start-time >coasters.tmp
-rm -f block-count-table.tmp
-rm -f coaster-block.data
+grep "RemoteLogHandler BLOCK_" < $LOG > blocks.log.tmp
-IFS=$'\n'
-REQUESTED=0
-RUNNING=0
-for LINE in $(cat coasters.tmp); do
- TIME=`echo $LINE | sed 's/^\([^ ]*\) .*$/\1/' `
- ID=`echo $LINE | sed 's/^.*id=\([^ ]*\)\(,.*$\|$\)/\1/'`
- ADD=`echo $LINE | sed -n 's/^.*BLOCK_REQUESTED.*w=\([^ ]*\),.*$/\1/p'`
- if [ "$ADD" != "" ]; then
- REQUESTED=$(($REQUESTED + $ADD))
- echo "$ID,$ADD" >> block-count-table.tmp
- else
- COUNT=`cat block-count-table.tmp | grep "$ID" | cut -d , -f 2`
- if echo $LINE | grep "BLOCK_ACTIVE" >/dev/null; then
- RUNNING=$(($RUNNING + $COUNT))
- fi
- if echo $LINE | grep "BLOCK_SHUTDOWN" >/dev/null; then
- RUNNING=$(($RUNNING - $COUNT))
- REQUESTED=$(($REQUESTED - $COUNT))
- fi
- fi
- echo $TIME $REQUESTED $RUNNING >> coaster-blocks.data
-done
+iso-to-secs < $LOG > secs.log.tmp
+
+head -1 secs.log.tmp | awk '{ print $1 }' > start-time.tmp
+
+normalise-event-start-time < secs.log.tmp > coasters.tmp
+
+# rm -f block-count-table.tmp
+# rm -f coaster-block.data
Modified: branches/woz-01/libexec/log-processing/makefile.coasters
===================================================================
--- branches/woz-01/libexec/log-processing/makefile.coasters 2010-06-16 21:50:53 UTC (rev 3381)
+++ branches/woz-01/libexec/log-processing/makefile.coasters 2010-06-16 21:54:29 UTC (rev 3382)
@@ -1,12 +1,13 @@
coaster-block-timeline.png: coaster-block-timeline.data
gnuplot $(SWIFT_PLOT_HOME)/coaster-block-timeline.plot
-extract-timeline:
+coaster-block-timeline.data: coasters.tmp
+ extract-coaster-blocks coasters.tmp
+
+coasters.tmp:
extract-coaster-timeline $(LOG)
-coaster-block-timeline.data: extract-timeline
-coasters.tmp: extract-timeline
-block-count-table.tmp: extract-timeline
+# block-count-table.tmp: extract-timeline
extract-coaster-qwait: coasters.tmp
extract-coaster-qwait $(LOG)
More information about the Swift-commit
mailing list