File tree 7 files changed +35
-19
lines changed
benchmark-partial-render-table
7 files changed +35
-19
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,9 @@ microbenchmarks:
24
24
make _noprecomp
25
25
$(RUN ) ./report-wasm-cb.config ./report-jsoo-cb.config
26
26
$(REPORT ) -format current-bench -config report-wasm-cb.config \
27
- -ylabel " Wasm_of_ocaml"
27
+ -ylabel " Wasm_of_ocaml" | sh utils/aggregate.sh wasm
28
28
$(REPORT ) -format current-bench -config report-jsoo-cb.config \
29
- -ylabel " Js_of_ocaml"
29
+ -ylabel " Js_of_ocaml" | sh utils/aggregate.sh js
30
30
31
31
graphsnopr : _noprecomp $(GRAPHSNOPR )
32
32
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 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 @@ -5,12 +5,13 @@ export NAME=Fiat-Crypto
5
5
SHELL =/bin/bash -o pipefail
6
6
7
7
bench :
8
- $(MAKE ) perform COMPILER=js_of_ocaml EXTRA_ARGS=" --enable effects"
9
- $(MAKE ) perform COMPILER=wasm_of_ocaml EXTRA_ARGS=" "
8
+ $(MAKE ) perform COMPILER=js_of_ocaml EXTRA_ARGS=" --enable effects" KIND=js
9
+ $(MAKE ) perform COMPILER=wasm_of_ocaml EXTRA_ARGS=" " KIND=wasm
10
10
11
11
perform : bedrock2_fiat_crypto.byte
12
12
/usr/bin/time -f " %E %R" $(COMPILER ) --debug times --source-map $(EXTRA_ARGS ) $< 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
15
16
bedrock2_fiat_crypto.byte : bedrock2_fiat_crypto.ml
16
17
ocamlfind ocamlc -w -20 -g -linkpkg -package js_of_ocaml -g $< -o $@
Original file line number Diff line number Diff line change @@ -6,13 +6,16 @@ SHELL=/bin/bash -o pipefail
6
6
7
7
bench :
8
8
cp -r ../sources/ml .
9
- $(MAKE ) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js
10
- $(MAKE ) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js
9
+ $(MAKE ) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js KIND=js
10
+ $(MAKE ) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js KIND=wasm
11
11
12
12
ARGS =ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml
13
13
14
14
perform :
15
15
/usr/bin/time -f " %E %R" $(COMPILER ) --debug times --opt 2 --pretty ` which ocamlc.byte` -o $(SCRIPT ) 2>&1 | \
16
- ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME )
16
+ ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) $(NAME ) | \
17
+ sh ../utils/aggregate.sh $(KIND )
17
18
/usr/bin/time -f ' {"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT ) -c $(ARGS ) 2>&1 | \
18
- sh ../utils/format_metrics.sh exec
19
+ sh ../utils/format_metrics.sh exec | \
20
+ sh ../utils/aggregate.sh $(KIND )
21
+
Original file line number Diff line number Diff line change @@ -5,15 +5,17 @@ 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
BYTE_FILE =../../janestreet/_build/default/lib/bonsai_web_components/partial_render_table/bench/bin/main.bc-for-jsoo
12
12
13
13
perform :
14
14
/usr/bin/time -f " %E %R" $(COMPILER ) --debug times --opt 2 --pretty $(BYTE_FILE ) -o out.js 2>&1 | \
15
15
tee /dev/stderr | \
16
- ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) " $( NAME) "
16
+ ocaml -I +str str.cma ../utils/compilation_metrics.ml $(COMPILER ) " $( NAME) " | \
17
+ sh ../utils/aggregate.sh $(KIND )
17
18
node $(SCRIPT ) | \
18
19
tee /dev/stderr | \
19
- ocaml -I +str str.cma summarize_results.ml $(COMPILER )
20
+ ocaml -I +str str.cma summarize_results.ml $(COMPILER ) | \
21
+ sh ../utils/aggregate.sh $(KIND )
Original file line number Diff line number Diff line change @@ -34,13 +34,13 @@ module Param = struct
34
34
{ warm_up_time = 1.0
35
35
; min_measures = 10
36
36
; max_confidence = 0.03
37
- ; max_duration = 20 .
37
+ ; max_duration = 120 .
38
38
; verbose = false
39
39
}
40
40
41
- let fast x = { x with min_measures = 5 ; max_confidence = 0.15 }
41
+ let fast x = { x with min_measures = 5 ; max_confidence = 0.15 ; max_duration = 20. }
42
42
43
- let ffast x = { x with min_measures = 2 ; max_confidence = 42. }
43
+ let ffast x = { x with min_measures = 2 ; max_confidence = 42. ; max_duration = 20. }
44
44
45
45
let verbose x = { x with verbose = true }
46
46
end
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ TEMP=$( mktemp)
3
+
4
+ tee $TEMP | \
5
+ jq ' .name |= "Js vs Wasm"' | \
6
+ jq ' .results[] |= select(.name | test("Code size") | not)' | \
7
+ jq ' .results[].metrics[].name |= if test("/") then .+"-' $1 ' " else .+"/' $1 ' " end'
8
+ cat $TEMP
9
+ rm $TEMP
You can’t perform that action at this time.
0 commit comments