File tree 6 files changed +28
-16
lines changed
benchmark-partial-render-table
6 files changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ microbenchmarks:
23
23
make _noprecomp
24
24
$(RUN ) ./report-wasm-cb.config ./report-jsoo-cb.config
25
25
$(REPORT ) -format current-bench -config report-wasm-cb.config \
26
- -ylabel " Wasm_of_ocaml"
26
+ -ylabel " Wasm_of_ocaml" | sh utils/aggregate.sh wasm
27
27
$(REPORT ) -format current-bench -config report-jsoo-cb.config \
28
- -ylabel " Js_of_ocaml"
28
+ -ylabel " Js_of_ocaml" | sh utils/aggregate.sh js
29
29
30
30
graphsnopr : _noprecomp $(GRAPHSNOPR )
31
31
Original file line number Diff line number Diff line change @@ -8,10 +8,11 @@ SCRIPT=../../CAMLBOY/_build/default/bin/web/bench_node.bc
8
8
ROM =../../CAMLBOY/resource/games/tobu.gb
9
9
10
10
bench :
11
- $(MAKE ) perform COMPILER=Js_of_ocaml SUFFIX=.js
12
- $(MAKE ) perform COMPILER=Wasm_of_ocaml SUFFIX=.wasm.js
11
+ $(MAKE ) perform COMPILER=Js_of_ocaml SUFFIX=.js KIND=js
12
+ $(MAKE ) perform COMPILER=Wasm_of_ocaml SUFFIX=.wasm.js KIND=wasm
13
13
14
14
perform :
15
15
node $(SCRIPT )$(SUFFIX ) $(ROM ) | \
16
16
tee /dev/stderr | \
17
- ocaml -I +str str.cma output_results.ml $(COMPILER )
17
+ ocaml output_results.ml $(COMPILER ) | \
18
+ sh ../utils/aggregate.sh $(KIND)
Original file line number Diff line number Diff line change 3
3
export NAME =Fiat-Crypto
4
4
5
5
bench :
6
- $(MAKE ) perform COMPILER=js_of_ocaml EXTRA_ARGS=" --enable effects"
7
- $(MAKE ) perform COMPILER=wasm_of_ocaml EXTRA_ARGS=" "
6
+ $(MAKE ) perform COMPILER=js_of_ocaml EXTRA_ARGS=" --enable effects" KIND=js
7
+ $(MAKE ) perform COMPILER=wasm_of_ocaml EXTRA_ARGS=" " KIND=wasm
8
8
9
9
perform : bedrock2_fiat_crypto.byte
10
- time -f " %E %R" $(COMPILER ) --debug times --source-map $(EXTRA_ARGS ) $< 2>&1 | ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME )
10
+ time -f " %E %R" $(COMPILER ) --debug times --source-map $(EXTRA_ARGS ) $< 2>&1 | \
11
+ ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME ) | \
12
+ sh ../utils/aggregate.sh $(KIND )
13
+
11
14
12
15
bedrock2_fiat_crypto.byte : bedrock2_fiat_crypto.ml
13
16
ocamlfind ocamlc -w -20 -g -linkpkg -package js_of_ocaml -g $< -o $@
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ export NAME=Ocamlc
4
4
5
5
bench :
6
6
cp -r ../sources/ml .
7
- $(MAKE ) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js
8
- $(MAKE ) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js
7
+ $(MAKE ) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js KIND=js
8
+ $(MAKE ) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js KIND=wasm
9
9
10
10
ARGS =ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml
11
11
12
12
perform :
13
- time -f " %E %R" $(COMPILER ) --debug times --opt 2 --pretty ` which ocamlc.byte` -o $(SCRIPT ) 2>&1 | ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME )
14
- time -f ' {"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT ) -c $(ARGS ) 2>&1 | sh ../utils/format_metrics.sh exec
13
+ time -f " %E %R" $(COMPILER ) --debug times --opt 2 --pretty ` which ocamlc.byte` -o $(SCRIPT ) 2>&1 | ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME ) | sh ../utils/aggregate.sh $( KIND )
14
+ time -f ' {"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT ) -c $(ARGS ) 2>&1 | sh ../utils/format_metrics.sh exec | sh ../utils/aggregate.sh $( KIND )
Original file line number Diff line number Diff line change @@ -5,12 +5,14 @@ export NAME=Partial Render Table
5
5
SHELL =/bin/bash -o pipefail
6
6
7
7
bench :
8
- $(MAKE ) perform COMPILER=Js_of_ocaml SCRIPT=main.bc.js
9
- $(MAKE ) perform COMPILER=Wasm_of_ocaml SCRIPT=main.bc.wasm.js
8
+ $(MAKE ) perform COMPILER=js_of_ocaml SCRIPT=main.bc.js KIND= js
9
+ $(MAKE ) perform COMPILER=wasm_of_ocaml SCRIPT=main.bc.wasm.js KIND=wasm
10
10
11
11
perform :
12
12
time -f " %E %R" $(COMPILER ) --debug times --opt 2 --pretty ` which ocamlc.byte` -o $(SCRIPT ) 2>&1 | \
13
- ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME )
13
+ ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME ) | \
14
+ sh ../utils/aggregate.sh $(KIND )
14
15
node $(SCRIPT ) | \
15
16
tee /dev/stderr | \
16
- ocaml -I +str str.cma summarize_results.ml $(COMPILER )
17
+ ocaml -I +str str.cma summarize_results.ml $(COMPILER ) | \
18
+ sh ../utils/aggregate.sh $(KIND )
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ TEMP=$( mktemp)
3
+
4
+ tee $TEMP | jq ' .name |= "Js vs Wasm" | .results[].metrics[].name |= .+"/' $1 ' "'
5
+ cat $TEMP
6
+ rm $TEMP
You can’t perform that action at this time.
0 commit comments