VMS/2__runs_and_data

changeset 2:c2e8c3b49545

plot__exe_vs_task_size: Script to plot the results of the exec_vs_task_size benchmarks
author Merten Sach <msach@mailbox.tu-berlin.de>
date Fri, 09 Dec 2011 15:09:34 +0100
parents 75c55af8338f
children 8323aae8c303
files scripts/plot__exe_vs_task_size
diffstat 1 files changed, 63 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/plot__exe_vs_task_size	Fri Dec 09 15:09:34 2011 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +#! /bin/bash
     1.5 +
     1.6 +# Author: Merten Sach <msach@mailbox.tu-berlin.de>
     1.7 +
     1.8 +usage=$(cat << EOF
     1.9 +This plots the  work cycles to exec cycles ratio agains the cycles between sync operations 
    1.10 +	$0 [datafile]
    1.11 +EOF
    1.12 +)
    1.13 +
    1.14 +file="$1"
    1.15 +if [ -z "$file" ]
    1.16 +then
    1.17 +	echo "$usage"
    1.18 +	exit 1
    1.19 +fi
    1.20 +
    1.21 +
    1.22 +plot_arguments="line(x) notitle with line lc 0 lw 1 lt 2"
    1.23 +output_file="$(echo "$file" | sed s/^[[:digit:]]*_//).eps"
    1.24 +thread_number_list=""
    1.25 +for arg in "$@"
    1.26 +do
    1.27 +	if [ -f "$arg" ]
    1.28 +	then
    1.29 +		number_of_threads=$(echo "$arg" | grep -oE "^[[:digit:]]*")
    1.30 +		thread_number_list="${thread_number_list}_${number_of_threads}"
    1.31 +		plot_arguments="$plot_arguments, '$arg' using 4:8 title '${number_of_threads} Threads'  with line lw 2"
    1.32 +	fi
    1.33 +done
    1.34 +thread_number_list=$(echo "${thread_number_list}" | sed s/^_//) #strip first underscore
    1.35 +output_file="${thread_number_list}${output_file}"
    1.36 +
    1.37 +cmd=$(cat << EOF
    1.38 +set terminal postscript enhanced color
    1.39 +set output "${output_file}"
    1.40 +set title "Exec-Cycles to Work-Cycles Ratio"
    1.41 +set xlabel "Cycles between Sync Operations"
    1.42 +set multiplot
    1.43 +	set origin 0,0
    1.44 +	set size   1,1
    1.45 +	set yrange [1:8]
    1.46 +	line(x)=2
    1.47 +	set key box
    1.48 +	plot ${plot_arguments}
    1.49 +	set notitle
    1.50 +	#set xlabel ""
    1.51 +	#set origin 0.40,0.40
    1.52 +	#set size 0.5,0.5
    1.53 +	#set xrange [0 : 2000]
    1.54 +	#set yrange [1 : 8]
    1.55 +	#set key box
    1.56 +	#replot
    1.57 +set nomultiplot
    1.58 +exit
    1.59 +EOF
    1.60 +)
    1.61 +	
    1.62 +echo "$cmd" | gnuplot
    1.63 +if [ -f "${output_file}" ]
    1.64 +then
    1.65 +	echo "Output written to ${output_file}"
    1.66 +fi