[Swift-commit] r7282 - in trunk: . bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Thu Nov 7 11:50:08 CST 2013
Author: davidk
Date: 2013-11-07 11:50:08 -0600 (Thu, 07 Nov 2013)
New Revision: 7282
Added:
trunk/bin/apptimes
Modified:
trunk/build.xml
Log:
apptimes script to plot run times of apps based on info files in *.d directories
Added: trunk/bin/apptimes
===================================================================
--- trunk/bin/apptimes (rev 0)
+++ trunk/bin/apptimes 2013-11-07 17:50:08 UTC (rev 7282)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+crash()
+{
+ MSG=$1
+ echo ${MSG} >&2
+ exit 1
+}
+
+usage()
+{
+ crash "Usage: $0 </path/to/*.d>"
+}
+
+if [ -z "$1" ]; then
+ usage
+fi
+
+directory=$1
+if [ ! -d "$directory" ]; then
+ crash "Directory $directory does not exist"
+fi
+
+(
+cat <<'EOF'
+set terminal png large size 1024,768
+set output "apptimes.png"
+set ylabel "Runtime (seconds)"
+set xlabel "Task"
+set key off
+plot "apptimes.data"
+EOF
+) > apptimes.gp
+
+grep APP_ $directory/* | cut -d: -f3 | cut -d, -f1 | sort -n > apptimes.data
+
+gnuplot apptimes.gp || crash "Error running gnuplot"
+rm apptimes.gp apptimes.data
+
+echo "Output image: apptimes.png"
Property changes on: trunk/bin/apptimes
___________________________________________________________________
Added: svn:executable
+ *
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2013-11-07 17:28:18 UTC (rev 7281)
+++ trunk/build.xml 2013-11-07 17:50:08 UTC (rev 7282)
@@ -85,6 +85,7 @@
<chmod perm="+x">
<fileset dir="${dist.dir}/bin">
+ <include name="apptimes"/>
<include name="gensites"/>
<include name="nswift"/>
<include name="start-coaster-service"/>
More information about the Swift-commit
mailing list