Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use `--profile` and `--benchmark-arguments` simultaneously. #1772

Closed
ldcasillas-progreso opened this issue Feb 9, 2016 · 2 comments
Closed

Comments

@ldcasillas-progreso
Copy link

@ldcasillas-progreso ldcasillas-progreso commented Feb 9, 2016

When I run the following command my benchmark suite runs with profiling enabled (except for the issue I reported in #1771):

% stack bench --profile 

When I run this command my benchmark runs without profiling (as it should), and the argument is passed to Critierion to select a subset of the tests:

% stack bench --benchmark-arguments='theo1'

But when I try to combine them both I get an error:

% stack bench --profile --benchmark-arguments='theo1'
tau-sigma-0.5.1: benchmarks
Running 1 benchmarks...
Benchmark bench: RUNNING...
Usage: bench ([-I|--ci CI] [-G|--no-gc] [-L|--time-limit SECS]
             [--resamples COUNT] [--regress RESP:PRED..] [--raw FILE]
             [-o|--output FILE] [--csv FILE] [--junit FILE]
             [-v|--verbosity LEVEL] [-t|--template FILE] [-m|--match MATCH]
             [NAME...] | [-n|--only-run ITERS] [-m|--match MATCH] [NAME...] |
Benchmark bench: ERROR
             [-l|--list] | [--version])

--  While building package tau-sigma-0.5.1 using:
      /Users/luis.casillas/.stack/setup-exe-cache/x86_64-osx/setup-Simple-Cabal-1.22.4.0-ghc-7.10.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.22.4.0 bench bench "--benchmark-options=theo1+RTS -p"
    Process exited with code: ExitFailure 1

More info:

% stack --version
Version 1.0.3, Git revision 260ea31e787593fe27d002985f45739d8a04a498 x86_64

Resolver is lts-3.20.

@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Feb 10, 2016

Good catch! +RTS options were not being terminated with -RTS. Please reopen if not fixed in HEAD.

@mgsloan mgsloan closed this Feb 10, 2016
mgsloan added a commit that referenced this issue Feb 10, 2016
@ldcasillas-progreso
Copy link
Author

@ldcasillas-progreso ldcasillas-progreso commented Feb 18, 2016

I can confirm that the following command no longer gets an error:

 stack bench --profile --benchmark-arguments='theo1'

It also produces the profile report file, and that profile reports on cost centers from my library component. There's some residual weirdness, but not within the scope of this ticket.

Stack version:

Version 1.0.3, Git revision 3f7b50fe598ec83eda5d393fe5b08a99ce5ac1e9 x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.