-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_results.sh
More file actions
executable file
·55 lines (49 loc) · 957 Bytes
/
generate_results.sh
File metadata and controls
executable file
·55 lines (49 loc) · 957 Bytes
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
#! /bin/bash
declare WORKSPACE_MEMBERS=(
"dummy"
"actix_full"
"actix_reqwest"
"gotham_reqwest"
"hyper_full"
"hyper_reqwest"
"warp_surf"
"tide_surf"
"warp_reqwest"
)
declare OPTIMISATION_FLAGS=(
"0"
"1"
"2"
"3"
"s"
"z"
)
declare LTO_FLAGS=(
"thin"
"fat"
)
declare CODEGEN_UNITS=(
"1"
"16"
)
for flag in ${OPTIMISATION_FLAGS[@]}; do
for member in ${WORKSPACE_MEMBERS[@]}; do
for lto in ${LTO_FLAGS[@]}; do
for units in ${CODEGEN_UNITS[@]}; do
printf '[profile.release]
opt-level = %s
lto = "%s"
codegen-units = %i
'\
"$([[ $flag =~ [0-3] ]] && echo $flag || echo "\"$flag\"")"\
"$lto"\
"$units"\
> .cargo/config
cargo bloat -p $member --release \
--crates -n 200 --message-format=json \
> shiny_app/results/${member}_opt_${flag}_lto_${lto}_cg_$units
done
done
done
done
rm .cargo/config