-
Notifications
You must be signed in to change notification settings - Fork 9
/
run.sh
executable file
·57 lines (49 loc) · 1.6 KB
/
run.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
#!/bin/bash
export RUSTFLAGS="-C target-cpu=native"
set -euxo pipefail
IFS=$'\n\t'
SLEEP_SEC=2
cd "$(dirname "$0")"
rm -rf kanal2
git clone https://github.com/fereidani/kanal/ kanal2 # hack to be able to reimport kanal with cargo
cargo clean
cargo update
mkdir -p target
cargo build --release --bin mpsc
cargo build --release --bin futures-channel
cargo build --release --bin flume
cargo build --release --bin flume-async
cargo build --release --bin crossbeam-channel
cargo build --release --bin async-channel
cargo build --release --bin kanal
cargo build --release --bin kanal-async
cargo build --release --bin kanal-std-mutex
cargo build --release --bin kanal-std-mutex-async
go build -o target/release/go_bench go.go
sleep $SLEEP_SEC
./target/release/mpsc | tee target/mpsc.csv
sleep $SLEEP_SEC
./target/release/futures-channel | tee target/futures-channel.csv
sleep $SLEEP_SEC
./target/release/flume | tee target/flume.csv
sleep $SLEEP_SEC
./target/release/flume-async | tee target/flume_async.csv
sleep $SLEEP_SEC
./target/release/crossbeam-channel | tee target/crossbeam-channel.csv
sleep $SLEEP_SEC
./target/release/async-channel | tee target/async-channel.csv
sleep $SLEEP_SEC
./target/release/kanal | tee target/kanal.csv
sleep $SLEEP_SEC
./target/release/kanal-async | tee target/kanal-async.csv
sleep $SLEEP_SEC
./target/release/kanal-std-mutex | tee target/kanal-std-mutex.csv
sleep $SLEEP_SEC
./target/release/kanal-std-mutex-async | tee target/kanal-std-mutex-async.csv
sleep $SLEEP_SEC
./target/release/go_bench | tee target/go.csv
./plot.py target/*.csv
echo "Test Environment:"
uname -srvp
rustc --version
go version