diff options
Diffstat (limited to 'code/glue/plot_sliding_perf')
-rwxr-xr-x | code/glue/plot_sliding_perf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/code/glue/plot_sliding_perf b/code/glue/plot_sliding_perf new file mode 100755 index 0000000..c71d42b --- /dev/null +++ b/code/glue/plot_sliding_perf @@ -0,0 +1,24 @@ +#!/bin/bash + +if [ -f "performance.out" ]; then + echo "x=load('performance.out'); + x=(x > 1); + y=length(x); + p=zeros(y-100,1); + for i=1:(y-100) + p(i)=mean(x(i:(i+100),1)); + end + p" \ + | octave -q \ + | tr -dc "0123456789.\n" \ + |grep -v "^$" \ + > performance.out.sliding-avg + + PWD=`pwd` + + echo "set title 'performance (sliding avg, window size 100) $PWD' + set terminal postscript + set output 'performance.out.ps' + plot 'performance.out.sliding-avg' using 1 with lines, 0.5" \ + | gnuplot +fi |