cabal bench implemented

Hi, Just wanted to advertise that 'cabal bench' is now implement and pushed to HEAD. Please try it out. It's described in the user guide. Cheers, Johan

Cool. Great stuff. I'll try it out on my 'bytestring' builder work.
2011/10/25 Bas van Dijk
On 25 October 2011 03:00, Johan Tibell
wrote: Just wanted to advertise that 'cabal bench' is now implement and pushed to HEAD. Please try it out. It's described in the user guide.
Great! I'l be sure to check it out on some of by packages with benchmarks.
Bas
_______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel

Hi Johan,
I tried out the new interface on the example you give in the
documentation. However, it was missing the 'time' dependency. This is
fixed in the attached patch. There was also a small typo in the
explanation of '--enable-benchmarks'; also fixed in attached patch.
I have two open questions:
* Is the >= 1.9.2 interface the right interface? From the changelog, I
would assume that it is already public and contains the test-suite
support only.
* It would be cool to have a 'cabal bench' command that builds and
executes the benchmarks.
However, even being able to build the benchmarks easily makes my life
already a lot simpler. Thanks for the work.
best regards,
Simon
2011/10/25 Simon Meier
Cool. Great stuff. I'll try it out on my 'bytestring' builder work.
2011/10/25 Bas van Dijk
: On 25 October 2011 03:00, Johan Tibell
wrote: Just wanted to advertise that 'cabal bench' is now implement and pushed to HEAD. Please try it out. It's described in the user guide.
Great! I'l be sure to check it out on some of by packages with benchmarks.
Bas
_______________________________________________ cabal-devel mailing list cabal-devel@haskell.org http://www.haskell.org/mailman/listinfo/cabal-devel

Hi Simon,
Thanks for trying it out and thanks for the patch. I've pushed it to HEAD.
On Tue, Oct 25, 2011 at 11:37 AM, Simon Meier
I have two open questions:
* Is the >= 1.9.2 interface the right interface? From the changelog, I would assume that it is already public and contains the test-suite support only.
Good question. You could either be asking * what's the earliest version of Cabal that doesn't blow up when it sees a benchmark sections, or * what's the earliest version of Cabal that can actually make use of the benchmark section. Duncan, which one should be report in the guide? Seems like the latter. * It would be cool to have a 'cabal bench' command that builds and
executes the benchmarks.
There already is one, I just haven't documented it yet. It works just like 'cabal test'. Example: cabal configure --enable-benchmarks cabal build cabal bench See 'cabal help bench' for a list of flags. Right now 'cabal bench' and 'cabal test' won't build the benchmarks/tests if they're not up to date. I don't quite remember the reason. I think it was technical. Duncan? Thomas? Cheers, Johan

On 25 October 2011 23:52, Johan Tibell
* It would be cool to have a 'cabal bench' command that builds and executes the benchmarks.
There already is one, I just haven't documented it yet. It works just like 'cabal test'. Example: cabal configure --enable-benchmarks cabal build cabal bench
Weird, I get a: $ cabal bench cabal: unrecognised command: bench (try --help) and I'm running the latest cabal-install from HEAD: $ cabal --version cabal-install version 0.11.3 using version 1.11.3 of the Cabal library Bas

On Tue, Oct 25, 2011 at 3:29 PM, Bas van Dijk
* It would be cool to have a 'cabal bench' command that builds and executes the benchmarks.
There already is one, I just haven't documented it yet. It works just
On 25 October 2011 23:52, Johan Tibell
wrote: like 'cabal test'. Example: cabal configure --enable-benchmarks cabal build cabal bench
Weird, I get a:
$ cabal bench cabal: unrecognised command: bench (try --help)
and I'm running the latest cabal-install from HEAD:
$ cabal --version cabal-install version 0.11.3 using version 1.11.3 of the Cabal library
Weird indeed. If you use Setup.hs directly it work: $ ghc -O Setup.hs -fforce-recomp -package-conf ~/src/cabal/Cabal/dist/package.conf.inplace [1 of 1] Compiling Main ( Setup.hs, Setup.o ) Linking Setup ... $ ./Setup configure --user --enable-benchmarks Configuring foo-1.0... $ ./Setup build Building foo-1.0... Preprocessing executable 'foo' for foo-1.0... [1 of 1] Compiling Main ( bench-foo.hs, dist/build/foo/foo-tmp/Main.o ) Linking dist/build/foo/foo ... Preprocessing benchmark 'bench-foo' for foo-1.0... [1 of 1] Compiling Main ( bench-foo.hs, dist/build/bench-foo/bench-foo-tmp/Main.o ) Linking dist/build/bench-foo/bench-foo ... $ ./Setup bench Running 1 benchmarks... Benchmark bench-foo: RUNNING... fib 20 took 0.000667s Benchmark bench-foo: FINISH

Hi Johan, There's a small typo in the Benchmarks section in the user guide. The attached patch fixes it. I'm going to try it out on one of my packages now... Bas

On 25 October 2011 20:45, Bas van Dijk
I'm going to try it out on one of my packages now...
Works great: https://github.com/basvandijk/vector-bytestring/blob/cabal_bench/vector-byte... A "cabal bench" command would be nice indeed. Thanks a lot for this feature! Bas
participants (3)
-
Bas van Dijk
-
Johan Tibell
-
Simon Meier