How to use a stack bench?

Just tried running tests on a project that I converted from cabal to the stack. The launch stack benchsimply prints project-name-version: benchmarkswithout further output. Do I have to pass extra flags onto the stack to see the exit of the criterion?

for comparison:

benchmark mainbench
  type:             exitcode-stdio-1.0
  hs-source-dirs:   src, bench
  main-is:          MainBench.hs
  build-depends:    base,
                    vector,
                    linear,
                    hmatrix,
                    hmatrix-gsl,
                    criterion,
                    random,
                    MonadRandom
  ghc-options:      -Wall
                    -O2
  default-language: Haskell2010

Edit: it's on stack-0.1.6.0

(This is not a duplicate of How to use the stack bench :))

+4
source share
1 answer

I think something is wrong with your setup. This is a typical result (project benniename, test name bennie-mark):

$ stack bench
bennie-0.1.0.0: benchmarks
Running 1 benchmarks...
Benchmark bennie-mark: RUNNING...
... output of bennie-mark ...
Benchmark bennie-mark: FINISH

This is with the stack-0.1.6.0. Perhaps try updating / reinstalling the stack. Maybe try it stack -v bench.

+2

Source: https://habr.com/ru/post/1612712/


All Articles