From a122db76a79615d35caf2abceb2e330c4582acfc Mon Sep 17 00:00:00 2001 From: Puneeth Chaganti Date: Mon, 18 Jul 2022 13:08:04 +0530 Subject: [PATCH] Obtain SANDMARK_CUSTOM_NAME from variant name and make it optional 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. --- .github/workflows/main.yml | 4 ++++ Makefile | 4 +--- README.md | 1 + run_all_serial.sh | 10 ++++------ 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fb951d685c..f37c4cb2d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,6 +49,7 @@ jobs: ls _results cat _results/* make json + make benchclean - name: 5.1.0+stable+parallel run: | @@ -65,6 +66,7 @@ jobs: ls _results cat _results/* make json + make benchclean - name: 5.1.0+trunk+serial run: | @@ -79,6 +81,7 @@ jobs: ls _results cat _results/* make json + make benchclean - name: 5.1.0+trunk+parallel run: | @@ -96,6 +99,7 @@ jobs: ls _results cat _results/* make json + make benchclean - name: test_notebooks run: | diff --git a/Makefile b/Makefile index 18ef0e1d10..24f1235105 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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)) diff --git a/README.md b/README.md index 8ca15f89f1..a22ac19db1 100644 --- a/README.md +++ b/README.md @@ -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/.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 | diff --git a/run_all_serial.sh b/run_all_serial.sh index def23583bb..bc0b172b99 100755 --- a/run_all_serial.sh +++ b/run_all_serial.sh @@ -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