5

Just tried to run the benchmarks on a project that I have converted from cabal to stack. Running stack bench just prints out project-name-version: benchmarks with no further output. Do I have to pass additional flags to stack to see the criterion output?

benchmark section for reference:

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: this is on stack-0.1.6.0

(This is no duplicate of How to use stack bench :) )

Community
  • 1
  • 1
fho
  • 6,787
  • 26
  • 71

1 Answers1

3

I think there is something amiss with your setup. This is typical output (project name is bennie, benchmark name is 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 stack-0.1.6.0. Perhaps try upgrading/reinstalling stack. Maybe try stack -v bench.

ErikR
  • 51,541
  • 9
  • 73
  • 124
  • I tried `-v` this gives pages of output from stack, but then hides the output from criterion/the program. This is on stack 0.1.6.0 too. – fho Oct 22 '15 at 12:14
  • Did you by chance setup the benchmark section in the cabal file differently? – fho Oct 22 '15 at 12:23
  • This is the cabal file I used: http://lpaste.net/3673762003903578112 The program beanie-mark simply does a `putStrLn "blah"`, but you should still see all of the surrounding output. – ErikR Oct 22 '15 at 15:47