Proposal: Add a benchmark section to .cabal files
johan.tibell at gmail.com
Tue Oct 4 07:59:39 CEST 2011
After having used Makefiles to build my benchmark suites for quite some time
I'm convinced we need support for building benchmark using Cabal. Make
doesn't solve the problem of building a benchmarks particularly well. There
are several problems:
* Building your library using Cabal and your benchmarks using Make sometimes
ends up with different package versions being used for the two separate
builds, resulting in compilation errors.
* Lots of functionality that's already in Cabal is duplicated in Makefiles
(e.g. preprocessor rules).
* It's hard to get proper incremental compilation; I always use `make -C
benchmarks clean all` to rebuild the benchmarks, just to make sure that
everything is up-to-date.
Step 1. Add basic support for building simple benchmark suites e.g. modelled
after test suite sections:
Cabal-Version: >= 1.9.2
This doesn't add much on top of normal executable sections, except that it
tells Cabal that this isn't an executable it should build by default or
Step 2. Add a detailed benchmark interface that allows the benchmark to
associate a real valued *measure* (optionally with upper and lower bounds)
with a benchmark name. Benchmark naming would work like test naming (e.g.
group/subgroup/name). This would allow us to track performance over time.
Step 2 needs to be fleshed out some more, but I think we can get quite a lot
of bang-for-the-buck with step 1.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cabal-devel