Skip to content

Commit

Permalink
Obtain SANDMARK_CUSTOM_NAME from variant name and make it optional
Browse files Browse the repository at this point in the history
But, also allow overriding it using an environment variable, if required.

Also, cleanup on each run in CI to avoid having multiple bench files in the
`_results/` directory when we benchmarks are run with different variant names.
  • Loading branch information
punchagan committed Dec 26, 2022
1 parent 5d4b137 commit 2f440d8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
ls _results
cat _results/*
make json
make benchclean
- name: 5.1.0+stable+parallel
run: |
Expand All @@ -65,6 +66,7 @@ jobs:
ls _results
cat _results/*
make json
make benchclean
- name: 5.1.0+trunk+serial
run: |
Expand All @@ -79,6 +81,7 @@ jobs:
ls _results
cat _results/*
make json
make benchclean
- name: 5.1.0+trunk+parallel
run: |
Expand All @@ -96,6 +99,7 @@ jobs:
ls _results
cat _results/*
make json
make benchclean
build-5-0:
strategy:
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ SANDMARK_REMOVE_PACKAGES ?= ""
# Default list of packages to override
SANDMARK_OVERRIDE_PACKAGES ?= ""

# Override orun with custom name
SANDMARK_CUSTOM_NAME ?= ""

# Flag to select whether to use sys_dune_hack
USE_SYS_DUNE_HACK ?= 0

Expand Down Expand Up @@ -235,6 +232,7 @@ blah:
@echo ${PACKAGES}

ocaml-versions/%.bench: depend check-parallel/% filter/% override_packages/% log_sandmark_hash ocaml-versions/%.json .FORCE
$(eval SANDMARK_CUSTOM_NAME ?= $*)
$(eval CONFIG_SWITCH_NAME = $*)
$(eval CONFIG_OPTIONS = $(shell jq -r '.configure // empty' ocaml-versions/$*.json))
$(eval CONFIG_RUN_PARAMS = $(shell jq -r '.runparams // empty' ocaml-versions/$*.json))
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ work on OS X is to install GNU sed with homebrew and then update the
| PRE_BENCH_EXEC | Any specific commands that needed to be executed before the benchmark. For eg. `PRE_BENCH_EXEC='taskset --cpu-list 3 setarch uname -m --addr-no-randomize'` | null string | executing benchmark | RUN_BENCH_TARGET | The executable to be used to run the benchmarks | `run_orun` | executing benchmark |
| RUN_BENCH_TARGET | The executable to be used to run the benchmarks | `run_orun` | executing benchmark |
| RUN_CONFIG_JSON | Input file selection that contains the list of benchmarks | `run_config.json` | executing benchmark |
| SANDMARK_CUSTOM_NAME | Custom name to use for the bench output file | variant from the `ocaml-version/<variant>.json` file name | executing benchmark |
| SANDMARK_DUNE_VERSION | Default dune version to be used | 2.9.0 | building compiler and its dependencies |
| SANDMARK_OVERRIDE_PACKAGES | A list of dependency packages with versions that can be overrided (optional) | "" | building compiler and its dependencies |
| SANDMARK_REMOVE_PACKAGES | A list of dependency packages to be dynamically removed (optional) | "" | building compiler and its dependencies |
Expand Down
10 changes: 4 additions & 6 deletions run_all_serial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
TAG='"macro_bench"' make run_config_filtered.json

OPT_WAIT=0 USE_SYS_DUNE_HACK=1 \
SANDMARK_CUSTOM_NAME=5.1.0+trunk \
RUN_CONFIG_JSON=run_config_filtered.json \
make ocaml-versions/5.1.0+trunk.bench
RUN_CONFIG_JSON=run_config_filtered.json \
make ocaml-versions/5.1.0+trunk.bench
OPT_WAIT=0 USE_SYS_DUNE_HACK=1 \
SANDMARK_CUSTOM_NAME=5.1.0+trunk+decouple_gc \
RUN_CONFIG_JSON=run_config_filtered.json \
make ocaml-versions/5.1.0+trunk+decouple_gc.bench
RUN_CONFIG_JSON=run_config_filtered.json \
make ocaml-versions/5.1.0+trunk+decouple_gc.bench

0 comments on commit 2f440d8

Please sign in to comment.