haskellhaskell-stackhaskell-criterion

Passing command line arguments to the benhmark program using stack


I'm using stack as a build tool, and criterion as benchmarking library. To run the benchmarks I execute the following command:

stack bench

Criterion accepts command line arguments to specify where the output should be written to. I would like to pass these arguments to the executable built and run by stack. Is there a way to achieve this?


Solution

  • stack bench --benchmark-arguments "--arguments --for --criterion"
    

    (It's among options listed under stack bench --help.)