Only exclude from log data less or equal than 0
This commit is contained in:
parent
479b41d262
commit
55d2d70b6e
|
@ -23,6 +23,44 @@ use_histo ()
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
contains_zero()
|
||||||
|
{
|
||||||
|
local prod bench datFile lineNum commTechs nbCommTechs nbArg iMin iMax
|
||||||
|
prod="$1"
|
||||||
|
bench="$2"
|
||||||
|
datFile="$3"
|
||||||
|
lineNum="$4"
|
||||||
|
|
||||||
|
if use_histo "$prod" "$bench"
|
||||||
|
then
|
||||||
|
eval commTechs=\$${bench}List
|
||||||
|
# Count the number of spaces in the list + the line feed
|
||||||
|
nbCommTechs=$(echo $commTechs | sed -r "s/[^ ]//g" | wc -c)
|
||||||
|
iMin=$((lineNum + 4))
|
||||||
|
iMax=$((lineNum + 1 + nbCommTechs * 3))
|
||||||
|
for i in $(seq $iMin 3 $iMax)
|
||||||
|
do
|
||||||
|
if head -$i $datFile | tail -1 | grep "0\.00" > /dev/null
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
iMin=$((lineNum + 9))
|
||||||
|
# Count the number of spaces in the list + the line feed
|
||||||
|
nbArg=$(echo $argTypeProdList | sed -r "s/[^ ]//g" | wc -c)
|
||||||
|
iMax=$((iMin + nbArg * 8 - 4))
|
||||||
|
for i in $(seq $iMin 4 $iMax)
|
||||||
|
do
|
||||||
|
if head -$i $datFile | tail -1 | grep "0\.00" > /dev/null
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
create_dat_header ()
|
create_dat_header ()
|
||||||
{
|
{
|
||||||
local prod bench metrique
|
local prod bench metrique
|
||||||
|
@ -270,7 +308,7 @@ create_gnuplot_file ()
|
||||||
esac
|
esac
|
||||||
datFile=bench_$bench-prod_$prod-metrique_$metrique.dat
|
datFile=bench_$bench-prod_$prod-metrique_$metrique.dat
|
||||||
patternPlotFile="bench_$bench-prod_$prod-$metrique-$avg-$yscale" # Name without extension of plot and ps files
|
patternPlotFile="bench_$bench-prod_$prod-$metrique-$avg-$yscale" # Name without extension of plot and ps files
|
||||||
if [ $metrique != "total_time" -o $yscale != "logscale" ]
|
if [ $yscale != "logscale" ] || ! contains_zero "$prod" "$bench" "$datFile" "$lineNum"
|
||||||
then
|
then
|
||||||
create_gnuplot_header "$prod" "$bench" "$patternPlotFile.gnuplot"
|
create_gnuplot_header "$prod" "$bench" "$patternPlotFile.gnuplot"
|
||||||
create_gnuplot_body "$prod" "$bench" "$yscale" "$ylabel" "$lineNum" "$datFile" "$patternPlotFile"
|
create_gnuplot_body "$prod" "$bench" "$yscale" "$ylabel" "$lineNum" "$datFile" "$patternPlotFile"
|
||||||
|
|
Loading…
Reference in New Issue