Commit f2717822 authored by Oleg Grenrus's avatar Oleg Grenrus
Browse files

Add simple cabal-benchmarks (only parser atm)

parent 0e1c0604
module Main where
import Criterion.Main (bench, defaultMain, env, whnf)
import Distribution.PackageDescription.Parsec (parseGenericPackageDescriptionMaybe)
import qualified Data.ByteString as BS
main :: IO ()
main = defaultMain
[ env (BS.readFile "Cabal/Cabal.cabal") $ \bs ->
bench "Cabal" $ whnf parseGenericPackageDescriptionMaybe bs
, env (BS.readFile "cabal-benchmarks/cabal-benchmarks.cabal") $ \bs ->
bench "cabal-benchmarks" $ whnf parseGenericPackageDescriptionMaybe bs
]
name: cabal-benchmarks
version: 3
copyright: 2003-2017, Cabal Development Team (see AUTHORS file)
license: BSD3
license-file: LICENSE
author: Cabal Development Team <cabal-devel@haskell.org>
maintainer: cabal-devel@haskell.org
homepage: http://www.haskell.org/cabal/
bug-reports: https://github.com/haskell/cabal/issues
synopsis: Benchmarks for the cabal dependency solver
description:
This package contains benchmarks that test cabal's dependency solver by running the cabal executable.
category: Distribution
cabal-version: >=1.10
build-type: Simple
extra-source-files: README.md
source-repository head
type: git
location: https://github.com/haskell/cabal/
subdir: solver-benchmarks
test-suite cabal-benchmarks
default-language: Haskell2010
type: exitcode-stdio-1.0
main-is: CabalBenchmarks.hs
hs-source-dirs: bench
ghc-options: -threaded -Wall -fwarn-tabs
build-depends:
base
, bytestring
, Cabal
, criterion >=1.5.6.2 && <1.6
......@@ -3,6 +3,7 @@ packages: cabal-install/ solver-benchmarks/
tests: True
packages: Cabal/Cabal-quickcheck/
packages: cabal-benchmarks/
-- Uncomment to allow picking up extra local unpacked deps:
--optional-packages: */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment