Skip to content

Commit

Permalink
Immerse benchmarks in the main text package
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodigrim committed Mar 28, 2021
1 parent 26a6750 commit 8aa259d
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
/cabal.test.project.local

# Test data repo ignored. Please see instruction in tests-and-benchmarks.markdown
/tests/text-test-data/
/benchmarks/text-test-data/
4 changes: 0 additions & 4 deletions benchmarks/.gitignore

This file was deleted.

4 changes: 4 additions & 0 deletions benchmarks/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Jasper Van der Jeugt <[email protected]>
Bryan O'Sullivan <[email protected]>
Tom Harper <[email protected]>
Duncan Coutts <[email protected]>
1 change: 0 additions & 1 deletion benchmarks/LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions benchmarks/Setup.hs

This file was deleted.

2 changes: 0 additions & 2 deletions benchmarks/cabal.project

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/haskell/Benchmarks.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ main = do
]
where
-- Location of a test file
tf = ("../tests/text-test-data" </>)
tf = ("benchmarks/text-test-data" </>)
2 changes: 1 addition & 1 deletion benchmarks/haskell/Multilang.hs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ benchmarks = [

main :: IO ()
main = do
!contents <- decodeUtf8 `fmap` B.readFile "../tests/text-test-data/yiwiki.xml"
!contents <- decodeUtf8 `fmap` B.readFile "benchmarks/text-test-data/yiwiki.xml"
forM_ benchmarks $ \(name, bmark) -> do
putStr $ name ++ " "
hFlush stdout
Expand Down
102 changes: 0 additions & 102 deletions benchmarks/text-benchmarks.cabal

This file was deleted.

3 changes: 1 addition & 2 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
benchmarks: >=7.4
jobs-selection: any
benchmarks: >=7.6
doctest: <9.0
doctest-options: -fobject-code -DINTEGER_GMP
branches: master
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages: .
packages: benchmarks
tests: True
benchmarks: True
constraints: semigroups -text -hashable -unordered-containers
73 changes: 65 additions & 8 deletions text.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ extra-source-files:
-- scripts/CaseFolding.txt
-- scripts/SpecialCasing.txt
README.markdown
benchmarks/Setup.hs
benchmarks/cbits-bench/*.c
benchmarks/haskell/*.hs
benchmarks/haskell/Benchmarks/*.hs
benchmarks/haskell/Benchmarks/Programs/*.hs
benchmarks/python/*.py
benchmarks/ruby/*.rb
benchmarks/text-benchmarks.cabal
changelog.md
include/*.h
scripts/*.hs
Expand Down Expand Up @@ -254,3 +246,68 @@ test-suite tests

default-language: Haskell2010
default-extensions: NondecreasingIndentation

benchmark text-benchmarks
type: exitcode-stdio-1.0
ghc-options: -Wall -O2 -rtsopts
build-depends: base,
binary,
bytestring-lexing >= 0.5.0,
containers,
deepseq,
filepath,
stringsearch,
tasty-bench >= 0.2,
text,
transformers,
utf8-string,
vector

if flag(bytestring-builder)
build-depends: bytestring >= 0.9 && < 0.10.4,
bytestring-builder >= 0.10.4
else
build-depends: bytestring >= 0.10.4

c-sources: benchmarks/cbits-bench/time_iconv.c
hs-source-dirs: benchmarks/haskell
main-is: Benchmarks.hs
other-modules:
Benchmarks.Builder
Benchmarks.Concat
Benchmarks.DecodeUtf8
Benchmarks.EncodeUtf8
Benchmarks.Equality
Benchmarks.FileRead
Benchmarks.FoldLines
Benchmarks.Mul
Benchmarks.Programs.BigTable
Benchmarks.Programs.Cut
Benchmarks.Programs.Fold
Benchmarks.Programs.Sort
Benchmarks.Programs.StripTags
Benchmarks.Programs.Throughput
Benchmarks.Pure
Benchmarks.ReadNumbers
Benchmarks.Replace
Benchmarks.Search
Benchmarks.Stream
Benchmarks.WordFrequencies

default-language: Haskell2010
default-extensions: NondecreasingIndentation
other-extensions: DeriveAnyClass

benchmark text-multilang
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks/haskell
main-is: Multilang.hs
other-modules: Timer
ghc-options: -Wall -O2
build-depends: base == 4.*,
bytestring,
text,
time

default-language: Haskell2010
default-extensions: NondecreasingIndentation

0 comments on commit 8aa259d

Please sign in to comment.