-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_local_benchmark.sh
83 lines (67 loc) · 2.08 KB
/
run_local_benchmark.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
set -e
shmem=$1
export LD_LIBRARY_PATH=$PWD/arrow_build/release
echo "Compiling benchmarks"
g++ -I.local/include -Larrow_build/release bench_local.cc -lplasma -larrow -O3 -o bench_local
n1=1000 #1000 bytes
n2=500 #10000
n3=200 #100000
n4=100 #1000000
n5=50 #10000000
n6=10 #100000000
echo "Running benchmarks..."
repetitions=100
RESULTS_DIR=results/local_results
mkdir -p $RESULTS_DIR
echo "Benchmark 1"
size=1000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n1.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n1 $size >> $RESULTS_DIR/benchmark-$repetitions.$n1.$size.result
offset=$(($offset+$n1))
done
echo "Benchmark 2"
size=10000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n2.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n2 $size >> $RESULTS_DIR/benchmark-$repetitions.$n2.$size.result
offset=$(($offset+$n2))
done
echo "Benchmark 3"
size=100000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n3.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n3 $size >> $RESULTS_DIR/benchmark-$repetitions.$n3.$size.result
offset=$(($offset+$n3))
done
echo "Benchmark 4"
size=1000000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n4.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n4 $size >> $RESULTS_DIR/benchmark-$repetitions.$n4.$size.result
offset=$(($offset+$n4))
done
echo "Benchmark 5"
size=10000000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n5.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n5 $size >> $RESULTS_DIR/benchmark-$repetitions.$n5.$size.result
offset=$(($offset+$n5))
done
echo "Benchmark 6"
size=100000000
echo "" > $RESULTS_DIR/benchmark-$repetitions.$n6.$size.result
for (( i=0; i<$repetitions; i++ ))
do
./bench_local /tmp/plasma $shmem $n6 $size >> $RESULTS_DIR/benchmark-$repetitions.$n6.$size.result
offset=$(($offset+$n6))
done
rm bench_local
echo "Done"
echo "Results written to files ($RESULTS_DIR/benchmark-<cycles>.<num_size>.<object_size>)"