Skip to content

Commit ee5375f

Browse files
vouillonhhugo
authored andcommitted
Prepare for more benchmarks
1 parent d9588a6 commit ee5375f

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

benchmarks/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ bench:
2222
$(MAKE) -C benchmark-ocamlc bench
2323
$(MAKE) -C benchmark-partial-render-table bench
2424
$(MAKE) -C benchmark-camlboy bench
25+
$(MAKE) -C benchmark-others bench
2526

2627
microbenchmarks:
2728
@date -u +"%FT%TZ - Microbenchmarks: starting"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SUBDIRS := $(wildcard */.)
2+
3+
bench: $(SUBDIRS)
4+
5+
$(SUBDIRS):
6+
$(MAKE) -C $@
7+
8+
.PHONY: all $(SUBDIRS)

benchmarks/benchmark-others/dune

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
; Ignore subdirectories
2+
3+
(dirs)

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)