Stack: Allow passing options to benchmarks

Created on 3 Jul 2015  路  4Comments  路  Source: commercialhaskell/stack

I want to pass --output something.html to a criterion benchmark. stack bench seems to not support passing options to benchmarks, or maybe I'm missing something.

With cabal, I would do cabal bench --benchmark-option="--output=$benchmark.html". If there were two benchmarks bench1 and bench2 in my project, that would build them both and then run them as bench1 --output bench1.html and bench2 --output bench2.html.

awaiting pull request

Most helpful comment

Implemented in #512. The stack equivalent is:

$ stack bench --benchmark-arguments '--output=$benchmark.html'

@snoyberg I'd say close :)

All 4 comments

We have code in place for this to work for tests, it should be almost identical for benchmarks. Would you like to take a stab at implementing this?

Implemented in #512. The stack equivalent is:

$ stack bench --benchmark-arguments '--output=$benchmark.html'

@snoyberg I'd say close :)

Good call, thanks again @markus1189!

Ah excellent, I upgraded stack to get that feature and it seems to work fine. Sorry for the noise.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mgsloan picture mgsloan  路  3Comments

mgsloan picture mgsloan  路  3Comments

sjakobi picture sjakobi  路  4Comments

symbiont-joseph-kachmar picture symbiont-joseph-kachmar  路  3Comments

sjakobi picture sjakobi  路  3Comments