Commit 67a1a736 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Fix bug in Linux

parent 9c18864e
source blaar.sh
#gnuplot << EOF #'-' to remove indenting tabulation
#stats '$1' using 2 name 'A'
#set title "Stats"
#set style fill solid 0.3
#set style histogram errorbars linewidth 1
#set bars front
#check files exists
for file in "$@"
do
[ -e $file ] || { echo "Profile file '$file' not found"; exit 1; }
done
#plot '' using (1):('A_means'):('A_stddev'):xtic(1) with boxerrorbars
#pause mouse close
#EOF
#generating time intervals
#cat <( #select this to debug
gnuplot <(
echo "set term qt title 'Sequences $@'"
#find the initial time (i.e first time of the first file)
echo "stats '$1' every ::::0 using 1 nooutput"
echo "offset=STATS_min"
echo "set grid"
echo "set border 3"
echo "set xlabel 'time (ms)' font ', 16'"
#echo "set ylabel 'process' font ', 16'" >> $TMP_DIR/profile.plt
echo "set lmargin at screen 0.1"
echo "set xlabel 'time (ms)' font ', 14'"
echo "set yrange[-$#:0.1]"
echo "set ytics font ', 16' scale 0 rotate by 45 right"
echo "set ytics font ', 14' scale 0 rotate by 45 right"
i=0
printf "set ytics (" #printf for no line return
for file in "$@"
do
printf "'$(basename $file .tsv)' -$i-0.1, "
((i++))
let i++ || true #Warning do not use ((i++)) as it would be considered as error (i.e. !=0 ) and quit
done
echo ")"
printf "plot "
i=0
for file in "$@"
do
printf "'$file' using ((\$1-offset)/1000):(-$#):(0):($#-$i) every ::0::0 notitle with vector linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$#):(0):($i) every ::0::0 notitle with vector linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$i):(0):($i-$#) every ::1 notitle with vector nohead linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$i-0.1):((\$2-\$1)/1000):(0) every ::1 notitle with vector nohead linewidth 1 linecolor $i , " # every ::1 avoid first point
printf "'$file' using ((\$2-offset)/1000):(-$i):(0):($i-$#) every ::1 notitle with vector nohead linewidth 1 linecolor $i, "
printf "'$file' using ((\$2-offset)/1000):(-$i-0.1):(\$3/1000):(0) every ::1 title '$(basename $file .tsv)' with vector size 2,60 noborder linewidth 10 linecolor $i , " # every ::1 avoid first point
printf "'$file' using ((\$1-offset)/1000):(-$#):(0):($#-$i) every ::0::0 notitle with vector noborder linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$#):(0):($i) every ::0::0 notitle with vector noborder linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$i):(0):($i-$#) every ::1 notitle with vector noborder nohead linewidth 1 linecolor $i, "
printf "'$file' using ((\$1-offset)/1000):(-$i-0.1):((\$2-\$1)/1000):(0) every ::1 notitle with vector noborder nohead linewidth 1 linecolor $i , " # every ::1 avoid first point
printf "'$file' using ((\$2-offset)/1000):(-$i):(0):($i-$#) every ::1 notitle with vector noborder nohead linewidth 1 linecolor $i, "
printf "'$file' using ((\$2-offset)/1000):(-$i-0.1):(\$3/1000):(0) every ::1 title '$(basename $file .tsv)' with vector noborder fixed linewidth 3 linecolor $i , " # every ::1 avoid first point
printf "'$file' using ((\$2-offset+\$3)/1000):(-$i):(0):($i-$#) every ::1 notitle with vector nohead linewidth 1 linecolor $i, "
((i++))
let i++ || true
done
echo " -$# linewidth 2 notitle"
echo "pause mouse close"
) &
echo "pause mouse close"
)&
#cat <( #select this to debug
gnuplot <(
#generating duration stats
#generating duration stats for each files from command line
echo "set term qt title 'Stats $@'"
echo "set print 'durations.dat'"
for file in "$@"
do
......@@ -60,7 +60,7 @@ echo "stats '$1' every ::::0 using 1 nooutput"
echo "offset=STATS_min"
echo "delta_v(x) = ( vD = x - old_v, old_v = x, vD)"
echo "old_v = offset"
echo "set xrange [3000000:*]" #We do stat after the first 3 s
echo "set xrange [1000000:*]" #We do stat before the first second
echo "set print 'period.dat'"
for file in "$@"
......@@ -87,7 +87,7 @@ i=0
for file in "$@"
do
printf "'$(basename $file .tsv)' $i, "
((i++))
let i++ || true #Warning do not use ((i++)) as it would be considered as error and quit
done
echo ") font ', 16'"
echo "plot 'durations.dat' using 0:(\$1/1000):(\$2/1000):0 with boxerror linecolor variable, '' using 0:(\$1/1000):(sprintf('%.3fms', \$1/1000)) with labels offset 0,1 font ',14'"
......@@ -101,5 +101,3 @@ echo "pause -1"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment