forked from fereidani/rust-channel-benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·46 lines (39 loc) · 1.17 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
#!/bin/bash
set -euxo pipefail
IFS=$'\n\t'
SLEEP_SEC=2
cd "$(dirname "$0")"
cargo clean
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
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/go_bench | tee target/go.csv
./plot.py target/*.csv
echo "Test Environment:"
uname -srvp
rustc --version
go version