-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexperiment.sh
More file actions
executable file
·47 lines (41 loc) · 1.47 KB
/
experiment.sh
File metadata and controls
executable file
·47 lines (41 loc) · 1.47 KB
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
#!/bin/bash
CUR_PATH=`pwd`
EXP_DIR="$CUR_PATH/exp_results/"
PLOTS_DIR="$CUR_PATH/plots/"
RUNS="${RUNS:-10}"
# $1 - mode, $2 - yrange
process_data() {
ci_file="${EXP_DIR}/all_log_ci_$1"
orig_file="${EXP_DIR}/all_log_orig_$1"
native_file="${EXP_DIR}/all_log_native_$1"
latency_file="${EXP_DIR}/combined_latency_$1"
throughput_file="${EXP_DIR}/combined_throughput_$1"
gawk 'ARGIND == 1 {a[$1]=$1/16 FS $2; next} ARGIND == 2 {a[$1]=a[$1] FS $2; next} ARGIND == 3 { print a[$1], $2 } ' $orig_file $ci_file $native_file > $latency_file
gawk 'ARGIND == 1 {a[$1]=$1/16 FS $3; next} ARGIND == 2 {a[$1]=a[$1] FS $3; next} ARGIND == 3 { print a[$1], $3 } ' $orig_file $ci_file $native_file > $throughput_file
sed -i "1s/.*/Concurrency Orig CI Native/" $latency_file
sed -i "1s/.*/Concurrency Orig CI Native/" $throughput_file
gnuplot -e "ofile='${PLOTS_DIR}/perf_$1.pdf'" -e "throughput_file='$throughput_file'" -e "latency_file='$latency_file'" -e "yr=$2" plot_mtcp.gp
}
run_mtcp_app() {
echo "Running MTCP server-client"
pushd mtcp-client/apps/example
time RUNS=$RUNS ./test_client.sh
popd
}
run_linux_app() {
echo "Running Native linux server-client"
pushd mtcp-native
time RUNS=$RUNS ./run_client.sh
popd
}
server=`hostname`
if [ "$server" != "lines" ]; then
echo "This experiment must be run from the 'lines' server. Aborting."
exit
fi
mkdir -p $EXP_DIR $PLOTS_DIR
./mnt_hugepages.sh
run_linux_app
run_mtcp_app
process_data "unmod" 10000
process_data "mod" 100