# HG changeset patch # User Merten Sach # Date 1323439774 -3600 # Node ID c2e8c3b49545bace05077ffab7aa14cddcd4921c # Parent 75c55af8338f8a93d7a55b424ac88002f6fe9ce1 plot__exe_vs_task_size: Script to plot the results of the exec_vs_task_size benchmarks diff -r 75c55af8338f -r c2e8c3b49545 scripts/plot__exe_vs_task_size --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/plot__exe_vs_task_size Fri Dec 09 15:09:34 2011 +0100 @@ -0,0 +1,63 @@ +#! /bin/bash + +# Author: Merten Sach + +usage=$(cat << EOF +This plots the work cycles to exec cycles ratio agains the cycles between sync operations + $0 [datafile] +EOF +) + +file="$1" +if [ -z "$file" ] +then + echo "$usage" + exit 1 +fi + + +plot_arguments="line(x) notitle with line lc 0 lw 1 lt 2" +output_file="$(echo "$file" | sed s/^[[:digit:]]*_//).eps" +thread_number_list="" +for arg in "$@" +do + if [ -f "$arg" ] + then + number_of_threads=$(echo "$arg" | grep -oE "^[[:digit:]]*") + thread_number_list="${thread_number_list}_${number_of_threads}" + plot_arguments="$plot_arguments, '$arg' using 4:8 title '${number_of_threads} Threads' with line lw 2" + fi +done +thread_number_list=$(echo "${thread_number_list}" | sed s/^_//) #strip first underscore +output_file="${thread_number_list}${output_file}" + +cmd=$(cat << EOF +set terminal postscript enhanced color +set output "${output_file}" +set title "Exec-Cycles to Work-Cycles Ratio" +set xlabel "Cycles between Sync Operations" +set multiplot + set origin 0,0 + set size 1,1 + set yrange [1:8] + line(x)=2 + set key box + plot ${plot_arguments} + set notitle + #set xlabel "" + #set origin 0.40,0.40 + #set size 0.5,0.5 + #set xrange [0 : 2000] + #set yrange [1 : 8] + #set key box + #replot +set nomultiplot +exit +EOF +) + +echo "$cmd" | gnuplot +if [ -f "${output_file}" ] +then + echo "Output written to ${output_file}" +fi