Reputation: 13
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.
Upvotes: 1
Views: 493
Reputation: 811
Looks like people run into this process
error when used on non-utf-8 consoles (source)
Can you try running chcp 65001
and then stack bench
? We can at least rule this out as a factor.
edit
if chcp 65001
works, you can set the console to utf-8 permanently, as detailed here
Upvotes: 3