-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-benchmarks.sh
executable file
·88 lines (73 loc) · 2 KB
/
build-benchmarks.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
84
85
86
87
88
#!/usr/bin/env sh
cd benchmark
FILE=../BENCHMARKS.md
truncate --size 0 $FILE
echo '# CPU info' >> $FILE
echo '```' >> $FILE
lscpu >> $FILE
echo '```' >> $FILE
echo 'Running on' $(uname -s -r -v -m -o) >> $FILE
echo '' >> $FILE
echo '# Benchmarks' >> $FILE
echo 'Benchmark code under [benchmark](benchmark) directory.' >> $FILE
echo 'More rounds per seconds is better.' >> $FILE
echo '' >> $FILE
echo 'As you can see, there is a lot to improve!' >> $FILE
echo '' >> $FILE
echo '' >> $FILE
echo '## THREAD-LOCAL STORAGE' >> $FILE
echo '```' >> $FILE
cargo run --bin tls --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## QUEUE' >> $FILE
echo '```' >> $FILE
cargo run --bin queue --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## STACK' >> $FILE
echo '```' >> $FILE
echo '' >> $FILE
cargo run --bin stack --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## MAP' >> $FILE
echo '```' >> $FILE
cargo run --bin map --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## MPSC CHANNEL' >> $FILE
echo '```' >> $FILE
cargo run --bin mpsc --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## SPSC CHANNEL' >> $FILE
echo '```' >> $FILE
cargo run --bin spsc --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## SPMC CHANNEL' >> $FILE
echo '```' >> $FILE
cargo run --bin spmc --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## MPMC CHANNEL' >> $FILE
echo '```' >> $FILE
cargo run --bin mpmc --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## REQUEST PROGRAM' >> $FILE
echo '```' >> $FILE
cargo run --bin request --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## MESSAGE REVERB PROGRAM' >> $FILE
echo '```' >> $FILE
cargo run --bin reverb --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE
echo '## HASH MINING' >> $FILE
echo '```' >> $FILE
cargo run --bin mining --release >> $FILE || exit 1
echo '```' >> $FILE
echo '' >> $FILE