Skip to content

Commit

Permalink
Merge pull request #267 from shakthimaan/dev/add-bench-Dockerfile-sup…
Browse files Browse the repository at this point in the history
…port

Added support for bench.Dockerfile
  • Loading branch information
shakthimaan committed Dec 15, 2021
2 parents da5e071 + 06deaf5 commit a770b00
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Expand Up @@ -8,6 +8,9 @@ SHELL=/bin/bash
# Make variable
MAKE=/usr/bin/make

# Set bench command from Dockerfile
BENCH_COMMAND=$(BENCHCMD)

# options for running the benchmarks
# benchmark build target type:
# - buildbench: build all single threaded tests
Expand Down Expand Up @@ -215,12 +218,9 @@ json:
};

prep_bench:
@{ TAG='"run_in_ci"' $(MAKE) multicore_parallel_run_config_filtered.json; \
TAG='"macro_bench"' $(MAKE) multicore_parallel_run_config_filtered_filtered.json; \
$(MAKE) multicore_parallel_run_config_filtered_filtered_2domains.json; \
BUILD_BENCH_TARGET=multibench_parallel RUN_CONFIG_JSON=multicore_parallel_run_config_filtered_filtered_2domains.json $(MAKE) ocaml-versions/4.10.0+multicore.bench; \
@{ $(BENCH_COMMAND); \
$(MAKE) json; \
} > /dev/null 2>&1;
};

bench: prep_bench
@cat data.json
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -330,6 +330,7 @@ work on OS X is to install GNU sed with homebrew and then update the
| Name | Description | Default Values | Usage |
| ---- | ----------- | -------------- | ----------------- |
| BUILD_BENCH_TARGET | Target selection for sequential (buildbench) and parallel (multibench) benchmarks | `buildbench` | building benchmark |
| BENCH_COMMAND | TAG selection and make command to run benchmarks | 4.14.0+domains for CI | With current-bench |
| RUN_CONFIG_JSON | Input file selection that contains the list of benchmarks | `run_config.json` | executing benchmark |
| RUN_BENCH_TARGET | The executable to be used to run the benchmarks | `run_orun` | executing benchmark |
| BUILD_ONLY | If the value is equal to 0 then execute the benchmarks otherwise skip the benchmark execution and exit the sandmark build process | 0 | building benchmark |
Expand Down
18 changes: 18 additions & 0 deletions bench.Dockerfile
@@ -0,0 +1,18 @@
FROM ocaml/opam:ubuntu-20.04-ocaml-4.12

ENV BENCHCMD="TAG='\"run_in_ci\"' $(MAKE) run_config_filtered.json; RUN_CONFIG_JSON=run_config_filtered.json $(MAKE) ocaml-versions/4.14.0+domains.bench"

WORKDIR /app

RUN sudo apt-get update
RUN sudo apt-get -y install libgmp-dev libdw-dev jq jo python3-pip pkg-config m4 autoconf

RUN opam update
RUN opam install dune.2.9.0

COPY . .

RUN sudo chown -R opam /app
RUN eval $(opam env)

RUN export ITER=1

0 comments on commit a770b00

Please sign in to comment.