-
Notifications
You must be signed in to change notification settings - Fork 2
/
plot_benchmarks_still
executable file
·32 lines (28 loc) · 1.13 KB
/
plot_benchmarks_still
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
source configuration
mkdir -p tmp
for c in $INPUTPREFIX_STILL/*
do
TYPE=$(basename $c)
if [ -e $PREFIX_STILL.FLIF.$TYPE ]
then
echo "Plotting $TYPE"
LOWER=$(sort -n $PREFIX_STILL.*.$TYPE | head -n 1 | cut -f 1 -d " ")
UPPER=$(sort -n $PREFIX_STILL.*.$TYPE | tail -n 1 | cut -f 1 -d " ")
# echo "Interval $LOWER..$UPPER"
LOWER=$(echo "$LOWER - $LOWER % 0.1 " | bc)
UPPER=$(echo "$UPPER - $UPPER % 0.01 " | bc)
# echo "Interval $LOWER..$UPPER"
LOGSCALE=""
if [ $(echo "$LOWER < 0.4" | bc) -eq 1 ]; then LOWER="0"; fi
if [ $(echo "$UPPER > 1.5" | bc) -eq 1 ]; then LOGSCALE="_logscale"; fi
perl -p -e "s/CATEGORY/$TYPE/g; s/LOWER/$LOWER/g; s/UPPER/$UPPER/g; s/NUMBER/$(wc -l $PREFIX_STILL.FLIF.$TYPE | cut -f 1 -d " ")/g" plot-template_still$LOGSCALE.gnu > tmp/plot.gnu
gnuplot tmp/plot.gnu
else
echo "Skipping $TYPE"
fi
done
LOWER=0
UPPER=32
perl -p -e "s/CATEGORY/\*/g; s/\*.png/all-still.png/; s/LOWER/$LOWER/g; s/UPPER/$UPPER/g; s/NUMBER/$(cat $PREFIX_STILL.FLIF.* |wc -l)/" plot-template_still_logscale.gnu > tmp/plot.gnu
gnuplot tmp/plot.gnu