[Swift-commit] r5559 - SwiftApps/SciColSim

ketan at ci.uchicago.edu ketan at ci.uchicago.edu
Tue Feb 7 21:09:46 CST 2012


Author: ketan
Date: 2012-02-07 21:09:46 -0600 (Tue, 07 Feb 2012)
New Revision: 5559

Added:
   SwiftApps/SciColSim/swiftoutput2plot
Modified:
   SwiftApps/SciColSim/plot_active.plt
   SwiftApps/SciColSim/plot_cumulative.plt
Log:
added swift output to plot script

Modified: SwiftApps/SciColSim/plot_active.plt
===================================================================
--- SwiftApps/SciColSim/plot_active.plt	2012-02-07 22:43:30 UTC (rev 5558)
+++ SwiftApps/SciColSim/plot_active.plt	2012-02-08 03:09:46 UTC (rev 5559)
@@ -1,9 +1,7 @@
 set terminal png enhanced
 set output "activeplot.png"
 set nokey
-set xlabel "Time"
+set xlabel "Time in sec"
 set ylabel "number of active jobs"
-set yrange [0:12]
-set xrange [3400:3800]
 set title "Active SciColSim jobs"
 plot "plot_active.txt" using 1 with line

Modified: SwiftApps/SciColSim/plot_cumulative.plt
===================================================================
--- SwiftApps/SciColSim/plot_cumulative.plt	2012-02-07 22:43:30 UTC (rev 5558)
+++ SwiftApps/SciColSim/plot_cumulative.plt	2012-02-08 03:09:46 UTC (rev 5559)
@@ -4,5 +4,5 @@
 set nokey
 set xlabel "Time in seconds"
 set ylabel "number of completed jobs"
-set title "Cumulative SciColSim jobs"
+set title "Cumulative jobs"
 plot "plot_cumulative.txt" using 1:2 with lines

Added: SwiftApps/SciColSim/swiftoutput2plot
===================================================================
--- SwiftApps/SciColSim/swiftoutput2plot	                        (rev 0)
+++ SwiftApps/SciColSim/swiftoutput2plot	2012-02-08 03:09:46 UTC (rev 5559)
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+#usage: ./swiftoutput2plot <swift.outfile>
+
+OUTFILE=$1
+
+#extract start time
+TMPDATE=`grep -i progress $OUTFILE | head -n 1 | cut -f4-9 -d ' '`
+START_TIME=`date +%s -d "$TMPDATE"`
+
+#extract end time
+TMPDATE=`grep -i progress $OUTFILE | tail -n 1 | cut -f4-9 -d ' '`
+END_TIME=`date +%s -d "$TMPDATE"`
+
+#duration
+DIFFTIME=$((END_TIME - START_TIME))
+
+#extract active runs in a file
+grep -o -i "Active:[0-9]*" $OUTFILE | awk -F: '{print $2}' > active.txt
+
+#extract successful completions in a file
+grep -o -i "Successfully:[0-9]*" $OUTFILE | awk -F: '{print $2}' > cumulative.txt
+
+#prepare tics
+activelines=`wc -l active.txt | awk '{print $1}'`
+cumulines=`wc -l cumulative.txt | awk '{print $1}'`
+
+activelinespertic=`echo "scale=5 ; $DIFFTIME / $activelines" | bc`
+seq 0 $activelinespertic $DIFFTIME > activetics.txt
+
+cumulinespertic=`echo "scale=5 ; $DIFFTIME / $cumulines" | bc`
+seq 0 $cumulinespertic $DIFFTIME > cumultics.txt
+
+#final plot data
+paste activetics.txt active.txt > plot_active.txt
+paste cumultics.txt cumulative.txt > plot_cumulative.txt
+


Property changes on: SwiftApps/SciColSim/swiftoutput2plot
___________________________________________________________________
Added: svn:executable
   + *




More information about the Swift-commit mailing list