Skip to content

Commit 3b2cd89

Browse files
committed
WIP
1 parent eb48cd6 commit 3b2cd89

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

benchmarks/benchmark-others/bigarrays/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
.PHONY: bench perform
22

3-
export NAME=Others/bigarrays
3+
export NAME=Others
4+
export SUBNAME=bigarrays
45

56
SHELL=/bin/bash -o pipefail
67

78
bench:
8-
@date -u +"%FT%TZ - $(NAME): starting"
9+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting"
910
ocamlc bench.ml -o bench
1011
$(MAKE) perform COMPILER=js_of_ocaml SCRIPT=bench.js KIND=js
1112
$(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=bench.wasm.js KIND=wasm
12-
@date -u +"%FT%TZ - $(NAME): done"
13+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done"
1314

1415
perform:
1516
$(COMPILER) --opt 2 --pretty bench -o $(SCRIPT)

benchmarks/benchmark-others/bin_prot/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
.PHONY: bench perform
22

3-
export NAME=Others/bin_prot
3+
export NAME=Others
4+
export SUBNAME=bin_prot
45

56
SHELL=/bin/bash -o pipefail
67

78
bench:
8-
@date -u +"%FT%TZ - $(NAME): starting"
9+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting"
910
opam pin add -n https://github.com/ocaml-wasm/bin_prot.git#wasm-v0.18
1011
opam install ppx_bin_prot
1112
dune build --profile release --root .
1213
node _build/default/bench.bc.js 400000
1314
$(MAKE) perform COMPILER=js_of_ocaml SCRIPT=_build/default/bench.bc.js KIND=js
1415
$(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=_build/default/bench.bc.wasm.js KIND=wasm
15-
@date -u +"%FT%TZ - $(NAME): done"
16+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done"
1617

1718
perform:
1819
/usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) 2>&1 1> /dev/null | \

benchmarks/benchmark-others/lexifi-g2pp/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
.PHONY: bench perform
22

3-
export NAME=Others/lexifi-g2pp
3+
export NAME=Others
4+
export SUBNAME=lexifi-g2pp
45

56
SHELL=/bin/bash -o pipefail
67

78
bench:
8-
@date -u +"%FT%TZ - $(NAME): starting"
9+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): starting"
910
dune build --profile release --root .
1011
$(MAKE) perform COMPILER=js_of_ocaml SCRIPT=_build/default/main.bc.js KIND=js
1112
$(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=_build/default/main.bc.wasm.js KIND=wasm
12-
@date -u +"%FT%TZ - $(NAME): done"
13+
@date -u +"%FT%TZ - $(NAME)/$(SUBNAME): done"
1314

1415
perform:
1516
/usr/bin/time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) 2>&1 1> /dev/null | \

benchmarks/utils/format_metrics.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
if [ "$1" = "exec" ]; then
4-
jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "Execution time", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}]}]}'
4+
jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "'${SUBNAME:-Execution time}'", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}]}]}'
55
else
66
jq '{name: ((.compiler[:1] | ascii_upcase) + .compiler[1:]), results: [{name: "'$NAME'", metrics: [{name: "Compilation time", "units":"s", value: (.time | split(":") | map(tonumber) | .[0] * 60 + .[1])}, {name: "Memory usage", "units":"KiB", value:(.mem)}]}]}'
77
fi

0 commit comments

Comments
 (0)