criterion-1.6.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 | None
Language | Haskell2010

Criterion.Main.Options

Description

Benchmarking command-line configuration.

Synopsis

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

# Documentation

data Mode Source #

Execution mode for a benchmark program.

Constructors

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

#### Instances

Instances details

Data Mode Source # |

Instance details

Defined in Criterion.Main.Options

Methods

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

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

toConstr :: Mode -> Constr Source #

dataTypeOf :: Mode -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Generic Mode Source # |

Instance details

Defined in Criterion.Main.Options

Associated Types

type Rep Mode |

Instance details

Defined in Criterion.Main.Options

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

Methods

from :: Mode -> Rep Mode x Source #

to :: Rep Mode x -> Mode Source #

Read Mode Source # |
Instance details Defined in Criterion.Main.Options Methods readsPrec :: Int -> ReadS Mode Source # readList :: ReadS [Mode] Source # readPrec :: ReadPrec Mode Source # readListPrec :: ReadPrec [Mode] Source #
Show Mode Source # |
Instance details Defined in Criterion.Main.Options Methods showsPrec :: Int -> Mode -> ShowS Source # show :: Mode -> String Source # showList :: [Mode] -> ShowS Source #
Eq Mode Source # |
Instance details Defined in Criterion.Main.Options Methods (==) :: Mode -> Mode -> Bool Source # (/=) :: Mode -> Mode -> Bool Source #
type Rep Mode Source # |

Instance details

Defined in Criterion.Main.Options

type Rep Mode = D1 ('MetaData "Mode" "Criterion.Main.Options" "criterion-1.6.4.0-Den7Wbk01XS5JptdBsMSpD" 'False) ((C1 ('MetaCons "List" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Version" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RunIters" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Config) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int64)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MatchType) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String]))) :+: C1 ('MetaCons "Run" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Config) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MatchType) :*: S1 ('MetaSel ('Nothing :: Maybe 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. When using this match type, benchmark names are treated as if they were file-paths. For example, the glob patterns `"*/ba*"` and `"*/*"` will match `"foo/bar"`, but `"*"` or `"*bar"` will not.
Pattern | Match by searching given substring in benchmark paths.
IPattern | Same as `Pattern`, but case insensitive.

#### Instances

Instances details

Data MatchType Source # |

Instance details

Defined in Criterion.Main.Options

Methods

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

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

toConstr :: MatchType -> Constr Source #

dataTypeOf :: MatchType -> DataType Source #

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

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

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

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

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

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

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

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

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

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

Bounded MatchType Source # |
Instance details Defined in Criterion.Main.Options Methods minBound :: MatchType Source # maxBound :: MatchType Source #
Enum MatchType Source # |

Instance details

Defined in Criterion.Main.Options

Methods

succ :: MatchType -> MatchType Source #

pred :: MatchType -> MatchType Source #

toEnum :: Int -> MatchType Source #

fromEnum :: MatchType -> Int Source #

enumFrom :: MatchType -> [MatchType] Source #

enumFromThen :: MatchType -> MatchType -> [MatchType] Source #

enumFromTo :: MatchType -> MatchType -> [MatchType] Source #

enumFromThenTo :: MatchType -> MatchType -> MatchType -> [MatchType] Source #

Generic MatchType Source # |

Instance details

Defined in Criterion.Main.Options

Associated Types

type Rep MatchType |

Instance details

Defined in Criterion.Main.Options

type Rep MatchType = D1 ('MetaData "MatchType" "Criterion.Main.Options" "criterion-1.6.4.0-Den7Wbk01XS5JptdBsMSpD" 'False) ((C1 ('MetaCons "Prefix" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Glob" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Pattern" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IPattern" 'PrefixI 'False) (U1 :: Type -> Type)))

Methods

from :: MatchType -> Rep MatchType x Source #

to :: Rep MatchType x -> MatchType Source #

Read MatchType Source # |
Instance details Defined in Criterion.Main.Options Methods readsPrec :: Int -> ReadS MatchType Source # readList :: ReadS [MatchType] Source # readPrec :: ReadPrec MatchType Source # readListPrec :: ReadPrec [MatchType] Source #
Show MatchType Source # |
Instance details Defined in Criterion.Main.Options Methods showsPrec :: Int -> MatchType -> ShowS Source # show :: MatchType -> String Source # showList :: [MatchType] -> ShowS Source #
Eq MatchType Source # |
Instance details Defined in Criterion.Main.Options Methods (==) :: MatchType -> MatchType -> Bool Source # (/=) :: MatchType -> MatchType -> Bool Source #
Ord MatchType Source # |

Instance details

Defined in Criterion.Main.Options

Methods

compare :: MatchType -> MatchType -> Ordering Source #

(<) :: MatchType -> MatchType -> Bool Source #

(<=) :: MatchType -> MatchType -> Bool Source #

(>) :: MatchType -> MatchType -> Bool Source #

(>=) :: MatchType -> MatchType -> Bool Source #

max :: MatchType -> MatchType -> MatchType Source #

min :: MatchType -> MatchType -> MatchType Source #

type Rep MatchType Source # |

Instance details

Defined in Criterion.Main.Options

type Rep MatchType = D1 ('MetaData "MatchType" "Criterion.Main.Options" "criterion-1.6.4.0-Den7Wbk01XS5JptdBsMSpD" 'False) ((C1 ('MetaCons "Prefix" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Glob" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Pattern" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IPattern" 'PrefixI 'False) (U1 :: Type -> Type)))

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.

config :: Config -> Parser Config Source #

Parse a configuration.

describe :: Config -> ParserInfo Mode Source #

Flesh out a command-line parser.

describeWith :: Parser a -> ParserInfo a Source #

Flesh out command-line information using a custom `Parser`.

versionInfo :: String Source #

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