I have to add some benchmarks using criterion
package.
I added to package.yaml
file these lines:
benchmarks:
hw4-bench:
main: Main.hs
source-dirs: bench
ghc-options:
- -eventlog
- -threaded
- -rtsopts
- -with-rtsopts=-N6
- -O2
dependencies:
- hw4
Also I created bench/Main.hs
.
But when I use stack bench
command I get a message with an error:
Running 1 benchmarks...
Benchmark hw4-bench: RUNNING...
benchmarking perimeter/strict perimeter of 100 points
time Completed 2 action(s).
terminateProcess: permission denied (Permission denied)
Code that I test is pure. Why do I have permission denied
error? Also if I run by myself bench.exe
file in .stack-work
I don't have any problems. What am I doing wrong?
UPD:
After updating stack
to version 2.5.1
, error <stderr>: commitAndReleaseBuffer: invalid argument (invalid character)
comes, but chcp 65001
solves it too.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…