Skip to content

Commit

Permalink
Produce a useful error message instead of undefined (gh-96)
Browse files Browse the repository at this point in the history
  • Loading branch information
bos committed Mar 2, 2016
1 parent bd11baf commit fb815c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Criterion/Internal.hs
Expand Up @@ -171,7 +171,8 @@ for select bs0 handle = go (0::Int) ("", bs0) >> return ()
foldM go idx [(addPrefix pfx desc, b) | b <- bs]

shouldRun pfx mkbench =
any (select . addPrefix pfx) . benchNames . mkbench $ undefined
any (select . addPrefix pfx) . benchNames . mkbench $
error "Criterion.env could not determine the list of your benchmarks since they force the environment (see the documentation for details)"

-- | Write summary JUnit file (if applicable)
junit :: [Report] -> Criterion ()
Expand Down
16 changes: 15 additions & 1 deletion changelog.md
@@ -1,4 +1,18 @@
* The "--only-run" option for benchmarks is renamed to "--iters".
1.1.1.0

*

* We now flush stdout and stderr after printing messages, so that
output is printed promptly even when piped (e.g. into a pager).

* A new function `runMode` allows custom benchmarking applications to
run benchmarks with control over the `Mode` used.

* Added support for Linux on non-Intel CPUs.

* This version supports GHC 8.

* The `--only-run` option for benchmarks is renamed to `--iters`.

1.1.0.0

Expand Down

0 comments on commit fb815c9

Please sign in to comment.