From 3ae32c55d919a19578c2de22d35e7ae5f7c40af6 Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Wed, 10 Aug 2022 11:16:53 +0530 Subject: [PATCH] Remove cabal.project in bench-runner and update the benchmark guide --- .packcheck.ignore | 1 - benchmark/bench-runner/cabal.project | 1 - docs/Developer/Benchmarks.md | 18 +++++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) delete mode 100644 benchmark/bench-runner/cabal.project diff --git a/.packcheck.ignore b/.packcheck.ignore index 4e75abe13..17ce4dc58 100644 --- a/.packcheck.ignore +++ b/.packcheck.ignore @@ -9,7 +9,6 @@ .packcheck.ignore appveyor.yml benchmark/bench-runner/default.nix -benchmark/bench-runner/cabal.project bin/ghc.sh bin/run-ci.sh bin/run-repl-quick.sh diff --git a/benchmark/bench-runner/cabal.project b/benchmark/bench-runner/cabal.project deleted file mode 100644 index 8ddc3d928..000000000 --- a/benchmark/bench-runner/cabal.project +++ /dev/null @@ -1 +0,0 @@ -packages: ., ../../targets diff --git a/docs/Developer/Benchmarks.md b/docs/Developer/Benchmarks.md index 625f91d40..88b9eea27 100644 --- a/docs/Developer/Benchmarks.md +++ b/docs/Developer/Benchmarks.md @@ -25,22 +25,30 @@ IMPORTANT NOTE: The first time you run this executable it may take a long time because it has to build the `bench-report` executable which has a lot of dependencies. -If you are using nix then use `benchmark/bench-runner/default.nix`. Build it -manually and install it in the root of the repository like so, +You can install it once in the root of the repository and use it multiple times. + +You can use `cabal.project.report` to install bench-runner like so: +``` +$ cabal install bench-runner --project-file=cabal.project.report --installdir=./ --overwrite-policy=always +$ ./bench-runner +``` + +If you're using nix, you can install bench-runner like so: ``` $ cd benchmark/bench-runner $ nix-shell --run 'cabal install bench-runner --installdir=../../ --overwrite-policy=always' $ cd ../../ +$ ./bench-runner ``` -You can also use `cabal.project.report` to directly build an run the `bench-runner` like so, +You can run the `bench-runner` without installing, like so: ``` $ cabal run bench-runner --project-file=cabal.project.report -- ``` -## bench.sh: Quick start +## bench-runner: Quick start -Assuming `bench-runner` is the executable. You can replace `bench-runner` with +Assuming `bench-runner` is the executable. You can replace `./bench-runner` with `cabal run bench-runner --project-file=cabal.project.report --` Useful commands: