-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathall.sh
executable file
·50 lines (39 loc) · 1.33 KB
/
all.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Huaicheng <huaicheng@cs.uchicago.edu>
# Process raw experimental data and plot the graph in one shot
# resolve the correct absolute path
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
TOPDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$TOPDIR/$SOURCE"
done
TOPDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
RAWDIR=$TOPDIR/raw
DATDIR=$TOPDIR/dat
SCRIPTDIR=$TOPDIR/script
PLOTDIR=$TOPDIR/plot
EPSDIR=$TOPDIR/eps
STATDIR=$TOPDIR/stat
# TODO: set the following params
#-------------------------------------------------------------------------------
# Set TARGET to the expriment folder (the subfolder under raw/)
TARGET="exptest"
# Supported TYPE:
# lat-cdf: Latency CDF graph
# lat-time: Latency (Y-axis) vs Time (X-axis)
# iops-time: IOPS (Y-axis) vs Time (X-axis)
TYPE="lat-cdf"
#-------------------------------------------------------------------------------
# only needed when generating dat files
$SCRIPTDIR/raw2dat.sh $TYPE $TARGET 0 1 0.0001
# generate plot file first
$SCRIPTDIR/genplot.sh $TARGET $TYPE
# get statistics
$SCRIPTDIR/getstat.sh $TARGET
# plot the graph
gnuplot $PLOTDIR/$TARGET.plot
# Open the graph
# TODO; Replace pdfreader with your PDF Reader software, e.g.,
# evince/okular on Linux or Previewer on Mac
pdfreader $EPSDIR/$TARGET.eps