Increase heap space in runtime for benchmarks.
Otherwise we're essentially benchmarking garbage collecting, which can give very inconsistent results.
This commit is contained in:
parent
94c917c13f
commit
1ef3534328
4 changed files with 8 additions and 4 deletions
9
Makefile
9
Makefile
|
@ -15,9 +15,10 @@ endif
|
|||
GHCOPTS=-fdiagnostics-color=always -j4 +RTS -A256m -RTS
|
||||
WEBSITE=../../web/pandoc.org
|
||||
REVISION?=1
|
||||
BENCHARGS?=--small --time-limit=2 --match=pattern $(PATTERN)
|
||||
# For gauge:
|
||||
BENCHARGS?=--small --ci=0.90 --match=pattern $(PATTERN) +RTS -T -A256m -I0 -RTS
|
||||
# For tasty-bench:
|
||||
# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
|
||||
# BENCHARGS?=--csv bench_$(TIMESTAMP).csv --timeout=6 +RTS -T -A256m -I0 -RTS $(if $(PATTERN),--pattern "$(PATTERN)",)
|
||||
|
||||
quick:
|
||||
stack install --ghc-options='$(GHCOPTS)' --install-ghc --flag 'pandoc:embed_data_files' --fast --test --ghc-options='$(GHCOPTS)' --test-arguments='-j4 --hide-successes $(TESTARGS)'
|
||||
|
@ -57,8 +58,8 @@ bench:
|
|||
--ghc-options '-Rghc-timing $(GHCOPTS)' \
|
||||
--benchmark-arguments='$(BENCHARGS)' 2>&1 | \
|
||||
tee "bench_latest.txt"
|
||||
perl -pe 's/\x1b\[[0-9;]*[mGK]//g;s/\r//;' bench_latest.txt > \
|
||||
"bench_$(TIMESTAMP).txt"
|
||||
perl -ne 'if (/\r/) { s/\x1b\[[0-9;]*[mGK]//g;s/^.*\r//;print; }' \
|
||||
bench_latest.txt > "bench_$(TIMESTAMP).txt"
|
||||
|
||||
reformat:
|
||||
for f in $(SOURCEFILES); do echo $$f; stylish-haskell -i $$f ; done
|
||||
|
|
|
@ -23,6 +23,7 @@ import Control.Monad.Except (throwError)
|
|||
import qualified Text.Pandoc.UTF8 as UTF8
|
||||
import qualified Data.ByteString as B
|
||||
import qualified Data.Text as T
|
||||
-- import Test.Tasty.Bench
|
||||
import Gauge
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.Maybe (mapMaybe)
|
||||
|
|
|
@ -827,6 +827,7 @@ benchmark benchmark-pandoc
|
|||
build-depends: bytestring,
|
||||
containers,
|
||||
gauge >= 0.2 && < 0.3,
|
||||
-- tasty-bench >= 0.2 && <= 0.3,
|
||||
mtl >= 2.2 && < 2.3,
|
||||
text >= 1.1.1.0 && < 1.3,
|
||||
time,
|
||||
|
|
|
@ -13,6 +13,7 @@ extra-deps:
|
|||
- doclayout-0.3.0.2
|
||||
- citeproc-0.3.0.9
|
||||
- texmath-0.12.2
|
||||
- tasty-bench-0.2.2
|
||||
ghc-options:
|
||||
"$locals": -fhide-source-paths -Wno-missing-home-modules
|
||||
resolver: lts-17.5
|
||||
|
|
Loading…
Add table
Reference in a new issue