How to use stack bench

2019-08-04 01:50发布

问题:

I've been playing around with using stack for a little haskell application, so far I have been able to build and test fine and was interested in looking at performance so tried stack bench however this is all that seems to happen:

c:\Users\jk\projects\foo>stack bench
stack bench

I don't think it can have done anything? My application does not appear to have run. Presuembly there is some configuration I am missing?

回答1:

stack bench will run any benchmark suites defined in your foo.cabal file. Without seeing it it's hard to say more, note though that you can run with -v to get more output.

From what I see above however I guess you don't have defined any benchmarks so stack bench does nothing because there is nothing to do :)