File tree 3 files changed +34
-0
lines changed
benchmarks/benchmark-camlboy
3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -49,4 +49,10 @@ RUN eval $(opam env) \
49
49
&& dune build --root janestreet --profile release lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.wasm.js lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.js
50
50
RUN cp -r janestreet/_build/default/lib/bonsai_web_components/partial_render_table/bench/bin/main.bc.* ./benchmarks/benchmark-partial-render-table
51
51
52
+ # CAMLBOY
53
+ RUN opam install brr \
54
+ && git clone --depth 1 https://github.com/ocaml-wasm/CAMLBOY -b node \
55
+ && cd CAMLBOY \
56
+ && opam exec -- dune build --root . --profile release ./bin/web
57
+
52
58
WORKDIR ./benchmarks
Original file line number Diff line number Diff line change
1
+ .PHONY : bench perform
2
+
3
+ export NAME =Camlboy
4
+
5
+ SHELL =/bin/bash -o pipefail
6
+
7
+ SCRIPT =../../CAMLBOY/_build/default/bin/web/bench_node.bc
8
+ ROM =../../CAMLBOY/resource/games/tobu.gb
9
+
10
+ bench :
11
+ $(MAKE ) perform COMPILER=Js_of_ocaml SUFFIX=.js
12
+ $(MAKE ) perform COMPILER=Wasm_of_ocaml SUFFIX=.wasm.js
13
+
14
+ perform :
15
+ node $(SCRIPT )$(SUFFIX ) $(ROM ) | \
16
+ tee /dev/stderr | \
17
+ ocaml -I +str str.cma output_results.ml $(COMPILER )
Original file line number Diff line number Diff line change
1
+ let () =
2
+ Format. printf
3
+ {| { " name" : " %s" ,
4
+ " results" :
5
+ [ { " name" : " Camlboy" ,
6
+ " metrics" :
7
+ [ { " name" : " Frames per second" ,
8
+ " units" : " Hz" ,
9
+ " value" : % s } ] } ] }@.| }
10
+ Sys. argv.(1 )
11
+ (read_line () )
You can’t perform that action at this time.
0 commit comments