criterion-1.1.4.0: Robust, reliable performance measurement and analysis

Copyright | (c) 2014 Bryan O'Sullivan
License | BSD-style
Maintainer | bos@serpentine.com
Stability | experimental
Portability | GHC
Safe Haskell | Safe
Language | Haskell98

Criterion.Main.Options

Description

Benchmarking command-line configuration.

Synopsis

- data Mode
  - = List
  - | Version
  - | RunIters Int64 MatchType [String]
  - | Run Config MatchType [String]
- data MatchType
  - = Prefix
  - | Glob
- defaultConfig :: Config
- parseWith :: Config -> Parser Mode
- describe :: Config -> ParserInfo Mode
- versionInfo :: String

# Documentation

data Mode Source #

Execution mode for a benchmark program.

Constructors

List | List all benchmarks.
Version | Print the version.
RunIters Int64 MatchType [String] | Run the given benchmarks, without collecting or analysing performance numbers.
Run Config MatchType [String] | Run and analyse the given benchmarks.

Instances

Eq Mode Source # |
Methods (==) :: Mode -> Mode -> Bool # (/=) :: Mode -> Mode -> Bool #
Data Mode Source # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Mode -> c Mode #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Mode #

toConstr :: Mode -> Constr #

dataTypeOf :: Mode -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Mode) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Mode) #

gmapT :: (forall b. Data b => b -> b) -> Mode -> Mode #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Mode -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Mode -> r #

gmapQ :: (forall d. Data d => d -> u) -> Mode -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Mode -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Mode -> m Mode #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Mode -> m Mode #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Mode -> m Mode #

Read Mode Source # |
Methods readsPrec :: Int -> ReadS Mode # readList :: ReadS [Mode] # readPrec :: ReadPrec Mode # readListPrec :: ReadPrec [Mode] #
Show Mode Source # |
Methods showsPrec :: Int -> Mode -> ShowS # show :: Mode -> String # showList :: [Mode] -> ShowS #
Generic Mode Source # |
Associated Types type Rep Mode :: * -> * # Methods from :: Mode -> Rep Mode x # to :: Rep Mode x -> Mode #
type Rep Mode Source # |

type Rep Mode = D1 (MetaData "Mode" "Criterion.Main.Options" "criterion-1.1.4.0-ECM4FYS7gfJ7vtJz8i8x5r" False) ((:+:) ((:+:) (C1 (MetaCons "List" PrefixI False) U1) (C1 (MetaCons "Version" PrefixI False) U1)) ((:+:) (C1 (MetaCons "RunIters" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int64)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MatchType)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]))))) (C1 (MetaCons "Run" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Config)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 MatchType)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))))))

data MatchType Source #

How to match a benchmark name.

Constructors

Prefix | Match by prefix. For example, a prefix of `"foo"` will match `"foobar"`.
Glob | Match by Unix-style glob pattern.

Instances

Bounded MatchType Source # |
Methods minBound :: MatchType # maxBound :: MatchType #
Enum MatchType Source # |
Methods succ :: MatchType -> MatchType # pred :: MatchType -> MatchType # toEnum :: Int -> MatchType # fromEnum :: MatchType -> Int # enumFrom :: MatchType -> [MatchType] # enumFromThen :: MatchType -> MatchType -> [MatchType] # enumFromTo :: MatchType -> MatchType -> [MatchType] # enumFromThenTo :: MatchType -> MatchType -> MatchType -> [MatchType] #
Eq MatchType Source # |
Methods (==) :: MatchType -> MatchType -> Bool # (/=) :: MatchType -> MatchType -> Bool #
Data MatchType Source # |

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> MatchType -> c MatchType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c MatchType #

toConstr :: MatchType -> Constr #

dataTypeOf :: MatchType -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c MatchType) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c MatchType) #

gmapT :: (forall b. Data b => b -> b) -> MatchType -> MatchType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> MatchType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> MatchType -> r #

gmapQ :: (forall d. Data d => d -> u) -> MatchType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> MatchType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> MatchType -> m MatchType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchType -> m MatchType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> MatchType -> m MatchType #

Ord MatchType Source # |
Methods compare :: MatchType -> MatchType -> Ordering # (<) :: MatchType -> MatchType -> Bool # (<=) :: MatchType -> MatchType -> Bool # (>) :: MatchType -> MatchType -> Bool # (>=) :: MatchType -> MatchType -> Bool # max :: MatchType -> MatchType -> MatchType # min :: MatchType -> MatchType -> MatchType #
Read MatchType Source # |
Methods readsPrec :: Int -> ReadS MatchType # readList :: ReadS [MatchType] # readPrec :: ReadPrec MatchType # readListPrec :: ReadPrec [MatchType] #
Show MatchType Source # |
Methods showsPrec :: Int -> MatchType -> ShowS # show :: MatchType -> String # showList :: [MatchType] -> ShowS #
Generic MatchType Source # |
Associated Types type Rep MatchType :: * -> * # Methods from :: MatchType -> Rep MatchType x # to :: Rep MatchType x -> MatchType #
type Rep MatchType Source # |
type Rep MatchType = D1 (MetaData "MatchType" "Criterion.Main.Options" "criterion-1.1.4.0-ECM4FYS7gfJ7vtJz8i8x5r" False) ((:+:) (C1 (MetaCons "Prefix" PrefixI False) U1) (C1 (MetaCons "Glob" PrefixI False) U1))

defaultConfig :: Config Source #

Default benchmarking configuration.

parseWith Source #

Arguments

:: Config | Default configuration to use if options are not explicitly specified.
-> Parser Mode |

Parse a command line.

describe :: Config -> ParserInfo Mode Source #

Flesh out a command line parser.

versionInfo :: String Source #

A string describing the version of this benchmark (really, the version of criterion that was used to build it).