ghcide/bench
Pepe Iborra 959db7b10b
Extract the benchmarking Shake rules to a standalone Cabal package (#941)
* [bench-hist] break down in rule functions

* Extract the benchmarking Shake rules to a shake-bench package

There's some room for reusing the rules used in the historic benchmarking suite
in other projects. This change makes that a bit easier and improves the
documentation and code structure.

The new structure is:
- lib:shake-bench - a Cabal library with functions to generate Shake rules
- ghcide:bench:benchHist - the ghcide instantiation of the above Shake rules

That's not to say that shake-bench is completely decoupled from ghcide -
there are still plenty of assumptions on how the benchmarks are organized, their
outputs, etc. But with a little bit of effort, it should be easy to make
these rules more reusable

* Fix nix build

* Fix license

* hlints and redundant imports

* more hlints

* Exclude shake-bench from the stack build
2020-12-07 15:03:15 +00:00
..
exe Allow to easily customise the example used for benchmarks (#838) 2020-09-29 07:47:09 +01:00
hist Extract the benchmarking Shake rules to a standalone Cabal package (#941) 2020-12-07 15:03:15 +00:00
lib Extract the benchmarking Shake rules to a standalone Cabal package (#941) 2020-12-07 15:03:15 +00:00
config.yaml Extract the benchmarking Shake rules to a standalone Cabal package (#941) 2020-12-07 15:03:15 +00:00
README.md Allow to easily customise the example used for benchmarks (#838) 2020-09-29 07:47:09 +01:00

Benchmarks

This folder contains two Haskell programs that work together to simplify the performance analysis of ghcide:

  • exe/Main.hs - a standalone benchmark runner. Run with stack run ghcide-bench
  • hist/Main.hs - a Shake script for running the benchmark suite over a set of commits.
    • Run with stack bench or cabal bench,
    • Requires a ghcide-bench binary in the PATH (usually provided by stack/cabal),
    • Calls cabal (or stack, configurable) internally to build the project,
    • Driven by the config.yaml configuration file. By default it compares HEAD with "master"

Further details available in the config file and the module header comments.