criterion-1.1.4.0: Robust, reliable performance measurement and analysis

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

Criterion.Types

Contents

- Configuration
- Benchmark descriptions
- Measurements
- Benchmark construction
  - Evaluation control
- Result types

Description

Types for benchmarking.

The core type is `Benchmarkable`, which admits both pure functions and `IO` actions.

For a pure function of type `a -> b`, the benchmarking harness calls this function repeatedly, each time with a different `Int64` argument (the number of times to run the function in a loop), and reduces the result the function returns to weak head normal form.

For an action of type `IO a`, the benchmarking harness calls the action repeatedly, but does not reduce the result.

Synopsis

- data Config = Config {
  - confInterval :: Double
  - forceGC :: Bool
  - timeLimit :: Double
  - resamples :: Int
  - regressions :: [([String], String)]
  - rawDataFile :: Maybe FilePath
  - reportFile :: Maybe FilePath
  - csvFile :: Maybe FilePath
  - jsonFile :: Maybe FilePath
  - junitFile :: Maybe FilePath
  - verbosity :: Verbosity
  - template :: FilePath
  }
- data Verbosity
  - = Quiet
  - | Normal
  - | Verbose
- newtype Benchmarkable = Benchmarkable {
  - runRepeatedly :: Int64 -> IO ()
  }
- data Benchmark where
  - Environment :: NFData env => IO env -> (env -> Benchmark) -> Benchmark
  - Benchmark :: String -> Benchmarkable -> Benchmark
  - BenchGroup :: String -> [Benchmark] -> Benchmark
- data Measured = Measured {
  - measTime :: !Double
  - measCpuTime :: !Double
  - measCycles :: !Int64
  - measIters :: !Int64
  - measAllocated :: !Int64
  - measNumGcs :: !Int64
  - measBytesCopied :: !Int64
  - measMutatorWallSeconds :: !Double
  - measMutatorCpuSeconds :: !Double
  - measGcWallSeconds :: !Double
  - measGcCpuSeconds :: !Double
  }
- fromInt :: Int64 -> Maybe Int64
- toInt :: Maybe Int64 -> Int64
- fromDouble :: Double -> Maybe Double
- toDouble :: Maybe Double -> Double
- measureAccessors :: Map String (Measured -> Maybe Double, String)
- measureKeys :: [String]
- measure :: Unbox a => (Measured -> a) -> Vector Measured -> Vector a
- rescale :: Measured -> Measured
- env :: NFData env => IO env -> (env -> Benchmark) -> Benchmark
- bench :: String -> Benchmarkable -> Benchmark
- bgroup :: String -> [Benchmark] -> Benchmark
- addPrefix :: String -> String -> String
- benchNames :: Benchmark -> [String]
- whnf :: (a -> b) -> a -> Benchmarkable
- nf :: NFData b => (a -> b) -> a -> Benchmarkable
- nfIO :: NFData a => IO a -> Benchmarkable
- whnfIO :: IO a -> Benchmarkable
- data Outliers = Outliers {
  - samplesSeen :: !Int64
  - lowSevere :: !Int64
  - lowMild :: !Int64
  - highMild :: !Int64
  - highSevere :: !Int64
  }
- data OutlierEffect
  - = Unaffected
  - | Slight
  - | Moderate
  - | Severe
- data OutlierVariance = OutlierVariance {
  - ovEffect :: OutlierEffect
  - ovDesc :: String
  - ovFraction :: Double
  }
- data Regression = Regression {
  - regResponder :: String
  - regCoeffs :: Map String Estimate
  - regRSquare :: Estimate
  }
- data KDE = KDE {
  - kdeType :: String
  - kdeValues :: Vector Double
  - kdePDF :: Vector Double
  }
- data Report = Report {
  - reportNumber :: Int
  - reportName :: String
  - reportKeys :: [String]
  - reportMeasured :: Vector Measured
  - reportAnalysis :: SampleAnalysis
  - reportOutliers :: Outliers
  - reportKDEs :: [KDE]
  }
- data SampleAnalysis = SampleAnalysis {
  - anRegress :: [Regression]
  - anOverhead :: Double
  - anMean :: Estimate
  - anStdDev :: Estimate
  - anOutlierVar :: OutlierVariance
  }
- data DataRecord
  - = Measurement Int String (Vector Measured)
  - | Analysed Report

# Configuration

data Config #

Top-level benchmarking configuration.

Constructors

Config |
Fields confInterval :: Double Confidence interval for bootstrap estimation (greater than 0, less than 1). forceGC :: Bool Obsolete, unused. This option used to force garbage collection between every benchmark run, but it no longer has an effect (we now unconditionally force garbage collection). This option remains solely for backwards API compatibility. timeLimit :: Double Number of seconds to run a single benchmark. (In practice, execution time will very slightly exceed this limit.) resamples :: Int Number of resamples to perform when bootstrapping. regressions :: [([String], String)] Regressions to perform. rawDataFile :: Maybe FilePath File to write binary measurement and analysis data to. If not specified, this will be a temporary file. reportFile :: Maybe FilePath File to write report output to, with template expanded. csvFile :: Maybe FilePath File to write CSV summary to. jsonFile :: Maybe FilePath File to write JSON-formatted results to. junitFile :: Maybe FilePath File to write JUnit-compatible XML results to. verbosity :: Verbosity Verbosity level to use when running and analysing benchmarks. template :: FilePath Template file to use if writing a report.

Instances

Eq Config # |
Methods (==) :: Config -> Config -> Bool # (/=) :: Config -> Config -> Bool #
Data Config # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Config -> c Config # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Config # toConstr :: Config -> Constr # dataTypeOf :: Config -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Config) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Config) # gmapT :: (forall b. Data b => b -> b) -> Config -> Config # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Config -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Config -> r # gmapQ :: (forall d. Data d => d -> u) -> Config -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Config -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Config -> m Config # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Config -> m Config # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Config -> m Config #
Read Config # |
Methods readsPrec :: Int -> ReadS Config # readList :: ReadS [Config] # readPrec :: ReadPrec Config # readListPrec :: ReadPrec [Config] #
Show Config # |
Methods showsPrec :: Int -> Config -> ShowS # show :: Config -> String # showList :: [Config] -> ShowS #
Generic Config # |
Associated Types type Rep Config :: * -> * # Methods from :: Config -> Rep Config x # to :: Rep Config x -> Config #
MonadReader Config Criterion # |
Methods ask :: Criterion Config # local :: (Config -> Config) -> Criterion a -> Criterion a # reader :: (Config -> a) -> Criterion a #
type Rep Config # |
type Rep Config = D1 (MetaData "Config" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "Config" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "confInterval") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)) ((:*:) (S1 (MetaSel (Just Symbol "forceGC") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)) (S1 (MetaSel (Just Symbol "timeLimit") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))) ((:*:) (S1 (MetaSel (Just Symbol "resamples") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) ((:*:) (S1 (MetaSel (Just Symbol "regressions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [([String], String)])) (S1 (MetaSel (Just Symbol "rawDataFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath)))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "reportFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath))) ((:*:) (S1 (MetaSel (Just Symbol "csvFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath))) (S1 (MetaSel (Just Symbol "jsonFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath))))) ((:*:) (S1 (MetaSel (Just Symbol "junitFile") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe FilePath))) ((:*:) (S1 (MetaSel (Just Symbol "verbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Verbosity)) (S1 (MetaSel (Just Symbol "template") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)))))))

data Verbosity #

Control the amount of information displayed.

Constructors

Quiet |
Normal |
Verbose |

Instances

Bounded Verbosity # |
Methods minBound :: Verbosity # maxBound :: Verbosity #
Enum Verbosity # |
Methods succ :: Verbosity -> Verbosity # pred :: Verbosity -> Verbosity # toEnum :: Int -> Verbosity # fromEnum :: Verbosity -> Int # enumFrom :: Verbosity -> [Verbosity] # enumFromThen :: Verbosity -> Verbosity -> [Verbosity] # enumFromTo :: Verbosity -> Verbosity -> [Verbosity] # enumFromThenTo :: Verbosity -> Verbosity -> Verbosity -> [Verbosity] #
Eq Verbosity # |
Methods (==) :: Verbosity -> Verbosity -> Bool # (/=) :: Verbosity -> Verbosity -> Bool #
Data Verbosity # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Verbosity -> c Verbosity # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Verbosity # toConstr :: Verbosity -> Constr # dataTypeOf :: Verbosity -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Verbosity) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Verbosity) # gmapT :: (forall b. Data b => b -> b) -> Verbosity -> Verbosity # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r # gmapQ :: (forall d. Data d => d -> u) -> Verbosity -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Verbosity -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity #
Ord Verbosity # |
Methods compare :: Verbosity -> Verbosity -> Ordering # (<) :: Verbosity -> Verbosity -> Bool # (<=) :: Verbosity -> Verbosity -> Bool # (>) :: Verbosity -> Verbosity -> Bool # (>=) :: Verbosity -> Verbosity -> Bool # max :: Verbosity -> Verbosity -> Verbosity # min :: Verbosity -> Verbosity -> Verbosity #
Read Verbosity # |
Methods readsPrec :: Int -> ReadS Verbosity # readList :: ReadS [Verbosity] # readPrec :: ReadPrec Verbosity # readListPrec :: ReadPrec [Verbosity] #
Show Verbosity # |
Methods showsPrec :: Int -> Verbosity -> ShowS # show :: Verbosity -> String # showList :: [Verbosity] -> ShowS #
Generic Verbosity # |
Associated Types type Rep Verbosity :: * -> * # Methods from :: Verbosity -> Rep Verbosity x # to :: Rep Verbosity x -> Verbosity #
type Rep Verbosity # |
type Rep Verbosity = D1 (MetaData "Verbosity" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) ((:+:) (C1 (MetaCons "Quiet" PrefixI False) U1) ((:+:) (C1 (MetaCons "Normal" PrefixI False) U1) (C1 (MetaCons "Verbose" PrefixI False) U1)))

# Benchmark descriptions

newtype Benchmarkable #

A pure function or impure action that can be benchmarked. The `Int64` parameter indicates the number of times to run the given function or action.

Constructors

Benchmarkable |
Fields runRepeatedly :: Int64 -> IO ()

data Benchmark where #

Specification of a collection of benchmarks and environments. A benchmark may consist of:

- An environment that creates input data for benchmarks, created with `env`.
- A single `Benchmarkable` item with a name, created with `bench`.
- A (possibly nested) group of `Benchmark`s, created with `bgroup`.

Constructors

Environment :: NFData env => IO env -> (env -> Benchmark) -> Benchmark |
Benchmark :: String -> Benchmarkable -> Benchmark |
BenchGroup :: String -> [Benchmark] -> Benchmark |

Instances

Show Benchmark # |
Methods showsPrec :: Int -> Benchmark -> ShowS # show :: Benchmark -> String # showList :: [Benchmark] -> ShowS #

# Measurements

data Measured #

A collection of measurements made while benchmarking.

Measurements related to garbage collection are tagged with GC. They will only be available if a benchmark is run with `"+RTS -T"`.

Packed storage. When GC statistics cannot be collected, GC values will be set to huge negative values. If a field is labeled with "GC" below, use `fromInt` and `fromDouble` to safely convert to "real" values.

Constructors

Measured |
Fields measTime :: !Double Total wall-clock time elapsed, in seconds. measCpuTime :: !Double Total CPU time elapsed, in seconds. Includes both user and kernel (system) time. measCycles :: !Int64 Cycles, in unspecified units that may be CPU cycles. (On i386 and x86_64, this is measured using the `rdtsc` instruction.) measIters :: !Int64 Number of loop iterations measured. measAllocated :: !Int64 (GC) Number of bytes allocated. Access using `fromInt`. measNumGcs :: !Int64 (GC) Number of garbage collections performed. Access using `fromInt`. measBytesCopied :: !Int64 (GC) Number of bytes copied during garbage collection. Access using `fromInt`. measMutatorWallSeconds :: !Double (GC) Wall-clock time spent doing real work ("mutation"), as distinct from garbage collection. Access using `fromDouble`. measMutatorCpuSeconds :: !Double (GC) CPU time spent doing real work ("mutation"), as distinct from garbage collection. Access using `fromDouble`. measGcWallSeconds :: !Double (GC) Wall-clock time spent doing garbage collection. Access using `fromDouble`. measGcCpuSeconds :: !Double (GC) CPU time spent doing garbage collection. Access using `fromDouble`.

Instances

Eq Measured # |
Methods (==) :: Measured -> Measured -> Bool # (/=) :: Measured -> Measured -> Bool #
Data Measured # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Measured -> c Measured # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Measured # toConstr :: Measured -> Constr # dataTypeOf :: Measured -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Measured) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Measured) # gmapT :: (forall b. Data b => b -> b) -> Measured -> Measured # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Measured -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Measured -> r # gmapQ :: (forall d. Data d => d -> u) -> Measured -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Measured -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Measured -> m Measured # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Measured -> m Measured # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Measured -> m Measured #
Read Measured # |
Methods readsPrec :: Int -> ReadS Measured # readList :: ReadS [Measured] # readPrec :: ReadPrec Measured # readListPrec :: ReadPrec [Measured] #
Show Measured # |
Methods showsPrec :: Int -> Measured -> ShowS # show :: Measured -> String # showList :: [Measured] -> ShowS #
Generic Measured # |
Associated Types type Rep Measured :: * -> * # Methods from :: Measured -> Rep Measured x # to :: Rep Measured x -> Measured #
NFData Measured # |
Methods rnf :: Measured -> () #
FromJSON Measured # |
Methods parseJSON :: Value -> Parser Measured # parseJSONList :: Value -> Parser [Measured] #
ToJSON Measured # |
Methods toJSON :: Measured -> Value # toEncoding :: Measured -> Encoding # toJSONList :: [Measured] -> Value # toEncodingList :: [Measured] -> Encoding #
Binary Measured # |
Methods put :: Measured -> Put # get :: Get Measured # putList :: [Measured] -> Put #
type Rep Measured # |
type Rep Measured = D1 (MetaData "Measured" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "Measured" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "measTime") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double)) (S1 (MetaSel (Just Symbol "measCpuTime") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double))) ((:*:) (S1 (MetaSel (Just Symbol "measCycles") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) ((:*:) (S1 (MetaSel (Just Symbol "measIters") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) (S1 (MetaSel (Just Symbol "measAllocated") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "measNumGcs") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) ((:*:) (S1 (MetaSel (Just Symbol "measBytesCopied") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) (S1 (MetaSel (Just Symbol "measMutatorWallSeconds") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double)))) ((:*:) (S1 (MetaSel (Just Symbol "measMutatorCpuSeconds") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double)) ((:*:) (S1 (MetaSel (Just Symbol "measGcWallSeconds") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double)) (S1 (MetaSel (Just Symbol "measGcCpuSeconds") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Double)))))))

fromInt :: Int64 -> Maybe Int64 #

Convert a (possibly unavailable) GC measurement to a true value. If the measurement is a huge negative number that corresponds to "no data", this will return `Nothing`.

toInt :: Maybe Int64 -> Int64 #

Convert from a true value back to the packed representation used for GC measurements.

fromDouble :: Double -> Maybe Double #

Convert a (possibly unavailable) GC measurement to a true value. If the measurement is a huge negative number that corresponds to "no data", this will return `Nothing`.

toDouble :: Maybe Double -> Double #

Convert from a true value back to the packed representation used for GC measurements.

measureAccessors :: Map String (Measured -> Maybe Double, String) #

Field names and accessors for a `Measured` record.

measureKeys :: [String] #

Field names in a `Measured` record, in the order in which they appear.

measure :: Unbox a => (Measured -> a) -> Vector Measured -> Vector a #

rescale :: Measured -> Measured #

Normalise every measurement as if `measIters` was 1.

(`measIters` itself is left unaffected.)

# Benchmark construction

env #

Arguments

:: NFData env |
=> IO env | Create the environment. The environment will be evaluated to normal form before being passed to the benchmark.
-> (env -> Benchmark) | Take the newly created environment and make it available to the given benchmarks.
-> Benchmark |

Run a benchmark (or collection of benchmarks) in the given environment. The purpose of an environment is to lazily create input data to pass to the functions that will be benchmarked.

A common example of environment data is input that is read from a file. Another is a large data structure constructed in-place.

Motivation. In earlier versions of criterion, all benchmark inputs were always created when a program started running. By deferring the creation of an environment when its associated benchmarks need the its, we avoid two problems that this strategy caused:

- Memory pressure distorted the results of unrelated benchmarks. If one benchmark needed e.g. a gigabyte-sized input, it would force the garbage collector to do extra work when running some other benchmark that had no use for that input. Since the data created by an environment is only available when it is in scope, it should be garbage collected before other benchmarks are run.
- The time cost of generating all needed inputs could be significant in cases where no inputs (or just a few) were really needed. This occurred often, for instance when just one out of a large suite of benchmarks was run, or when a user would list the collection of benchmarks without running any.

Creation. An environment is created right before its related benchmarks are run. The `IO` action that creates the environment is run, then the newly created environment is evaluated to normal form (hence the `NFData` constraint) before being passed to the function that receives the environment.

Complex environments. If you need to create an environment that contains multiple values, simply pack the values into a tuple.

Lazy pattern matching. In situations where a "real" environment is not needed, e.g. if a list of benchmark names is being generated, `undefined` will be passed to the function that receives the environment. This avoids the overhead of generating an environment that will not actually be used.

The function that receives the environment must use lazy pattern matching to deconstruct the tuple, as use of strict pattern matching will cause a crash if `undefined` is passed in.

Example. This program runs benchmarks in an environment that contains two values. The first value is the contents of a text file; the second is a string. Pay attention to the use of a lazy pattern to deconstruct the tuple in the function that returns the benchmarks to be run.

    setupEnv = do
      let small = replicate 1000 (1 :: Int)
      big <- map length . words <$> readFile "/usr/dict/words"
      return (small, big)

    main = defaultMain [
       -- notice the lazy pattern match here!
       env setupEnv $ \ ~(small,big) -> bgroup "main" [
       bgroup "small" [
         bench "length" $ whnf length small
       , bench "length . filter" $ whnf (length . filter (==1)) small
       ]
     ,  bgroup "big" [
         bench "length" $ whnf length big
       , bench "length . filter" $ whnf (length . filter (==1)) big
       ]
     ] ]

Discussion. The environment created in the example above is intentionally not ideal. As Haskell's scoping rules suggest, the variable `big` is in scope for the benchmarks that use only `small`. It would be better to create a separate environment for `big`, so that it will not be kept alive while the unrelated benchmarks are being run.

bench #

Arguments

:: String | A name to identify the benchmark.
-> Benchmarkable | An activity to be benchmarked.
-> Benchmark |

Create a single benchmark.

bgroup #

Arguments

:: String | A name to identify the group of benchmarks.
-> [Benchmark] | Benchmarks to group under this name.
-> Benchmark |

Group several benchmarks together under a common name.

addPrefix #

Arguments

:: String | Prefix.
-> String | Name.
-> String |

Add the given prefix to a name. If the prefix is empty, the name is returned unmodified. Otherwise, the prefix and name are separated by a `'/'` character.

benchNames :: Benchmark -> [String] #

Retrieve the names of all benchmarks. Grouped benchmarks are prefixed with the name of the group they're in.

## Evaluation control

whnf :: (a -> b) -> a -> Benchmarkable #

Apply an argument to a function, and evaluate the result to weak head normal form (WHNF).

nf :: NFData b => (a -> b) -> a -> Benchmarkable #

Apply an argument to a function, and evaluate the result to head normal form (NF).

nfIO :: NFData a => IO a -> Benchmarkable #

Perform an action, then evaluate its result to head normal form. This is particularly useful for forcing a lazy `IO` action to be completely performed.

whnfIO :: IO a -> Benchmarkable #

Perform an action, then evaluate its result to weak head normal form (WHNF). This is useful for forcing an `IO` action whose result is an expression to be evaluated down to a more useful value.

# Result types

data Outliers #

Outliers from sample data, calculated using the boxplot technique.

Constructors

Outliers |
Fields samplesSeen :: !Int64 lowSevere :: !Int64 More than 3 times the interquartile range (IQR) below the first quartile. lowMild :: !Int64 Between 1.5 and 3 times the IQR below the first quartile. highMild :: !Int64 Between 1.5 and 3 times the IQR above the third quartile. highSevere :: !Int64 More than 3 times the IQR above the third quartile.

Instances

Eq Outliers # |
Methods (==) :: Outliers -> Outliers -> Bool # (/=) :: Outliers -> Outliers -> Bool #
Data Outliers # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Outliers -> c Outliers # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Outliers # toConstr :: Outliers -> Constr # dataTypeOf :: Outliers -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Outliers) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Outliers) # gmapT :: (forall b. Data b => b -> b) -> Outliers -> Outliers # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Outliers -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Outliers -> r # gmapQ :: (forall d. Data d => d -> u) -> Outliers -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Outliers -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Outliers -> m Outliers # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Outliers -> m Outliers # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Outliers -> m Outliers #
Read Outliers # |
Methods readsPrec :: Int -> ReadS Outliers # readList :: ReadS [Outliers] # readPrec :: ReadPrec Outliers # readListPrec :: ReadPrec [Outliers] #
Show Outliers # |
Methods showsPrec :: Int -> Outliers -> ShowS # show :: Outliers -> String # showList :: [Outliers] -> ShowS #
Generic Outliers # |
Associated Types type Rep Outliers :: * -> * # Methods from :: Outliers -> Rep Outliers x # to :: Rep Outliers x -> Outliers #
Monoid Outliers # |
Methods mempty :: Outliers # mappend :: Outliers -> Outliers -> Outliers # mconcat :: [Outliers] -> Outliers #
NFData Outliers # |
Methods rnf :: Outliers -> () #
FromJSON Outliers # |
Methods parseJSON :: Value -> Parser Outliers # parseJSONList :: Value -> Parser [Outliers] #
ToJSON Outliers # |
Methods toJSON :: Outliers -> Value # toEncoding :: Outliers -> Encoding # toJSONList :: [Outliers] -> Value # toEncodingList :: [Outliers] -> Encoding #
Binary Outliers # |
Methods put :: Outliers -> Put # get :: Get Outliers # putList :: [Outliers] -> Put #
type Rep Outliers # |
type Rep Outliers = D1 (MetaData "Outliers" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "Outliers" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "samplesSeen") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) (S1 (MetaSel (Just Symbol "lowSevere") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64))) ((:*:) (S1 (MetaSel (Just Symbol "lowMild") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) ((:*:) (S1 (MetaSel (Just Symbol "highMild") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64)) (S1 (MetaSel (Just Symbol "highSevere") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int64))))))

data OutlierEffect #

A description of the extent to which outliers in the sample data affect the sample mean and standard deviation.

Constructors

Unaffected | Less than 1% effect.
Slight | Between 1% and 10%.
Moderate | Between 10% and 50%.
Severe | Above 50% (i.e. measurements are useless).

Instances

Eq OutlierEffect # |
Methods (==) :: OutlierEffect -> OutlierEffect -> Bool # (/=) :: OutlierEffect -> OutlierEffect -> Bool #
Data OutlierEffect # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OutlierEffect -> c OutlierEffect # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OutlierEffect # toConstr :: OutlierEffect -> Constr # dataTypeOf :: OutlierEffect -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c OutlierEffect) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OutlierEffect) # gmapT :: (forall b. Data b => b -> b) -> OutlierEffect -> OutlierEffect # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OutlierEffect -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OutlierEffect -> r # gmapQ :: (forall d. Data d => d -> u) -> OutlierEffect -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OutlierEffect -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OutlierEffect -> m OutlierEffect # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OutlierEffect -> m OutlierEffect # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OutlierEffect -> m OutlierEffect #
Ord OutlierEffect # |
Methods compare :: OutlierEffect -> OutlierEffect -> Ordering # (<) :: OutlierEffect -> OutlierEffect -> Bool # (<=) :: OutlierEffect -> OutlierEffect -> Bool # (>) :: OutlierEffect -> OutlierEffect -> Bool # (>=) :: OutlierEffect -> OutlierEffect -> Bool # max :: OutlierEffect -> OutlierEffect -> OutlierEffect # min :: OutlierEffect -> OutlierEffect -> OutlierEffect #
Read OutlierEffect # |
Methods readsPrec :: Int -> ReadS OutlierEffect # readList :: ReadS [OutlierEffect] # readPrec :: ReadPrec OutlierEffect # readListPrec :: ReadPrec [OutlierEffect] #
Show OutlierEffect # |
Methods showsPrec :: Int -> OutlierEffect -> ShowS # show :: OutlierEffect -> String # showList :: [OutlierEffect] -> ShowS #
Generic OutlierEffect # |
Associated Types type Rep OutlierEffect :: * -> * # Methods from :: OutlierEffect -> Rep OutlierEffect x # to :: Rep OutlierEffect x -> OutlierEffect #
NFData OutlierEffect # |
Methods rnf :: OutlierEffect -> () #
FromJSON OutlierEffect # |
Methods parseJSON :: Value -> Parser OutlierEffect # parseJSONList :: Value -> Parser [OutlierEffect] #
ToJSON OutlierEffect # |
Methods toJSON :: OutlierEffect -> Value # toEncoding :: OutlierEffect -> Encoding # toJSONList :: [OutlierEffect] -> Value # toEncodingList :: [OutlierEffect] -> Encoding #
Binary OutlierEffect # |
Methods put :: OutlierEffect -> Put # get :: Get OutlierEffect # putList :: [OutlierEffect] -> Put #
type Rep OutlierEffect # |
type Rep OutlierEffect = D1 (MetaData "OutlierEffect" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) ((:+:) ((:+:) (C1 (MetaCons "Unaffected" PrefixI False) U1) (C1 (MetaCons "Slight" PrefixI False) U1)) ((:+:) (C1 (MetaCons "Moderate" PrefixI False) U1) (C1 (MetaCons "Severe" PrefixI False) U1)))

data OutlierVariance #

Analysis of the extent to which outliers in a sample affect its standard deviation (and to some extent, its mean).

Constructors

OutlierVariance |
Fields ovEffect :: OutlierEffect Qualitative description of effect. ovDesc :: String Brief textual description of effect. ovFraction :: Double Quantitative description of effect (a fraction between 0 and 1).

Instances

Eq OutlierVariance # |
Methods (==) :: OutlierVariance -> OutlierVariance -> Bool # (/=) :: OutlierVariance -> OutlierVariance -> Bool #
Data OutlierVariance # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> OutlierVariance -> c OutlierVariance # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c OutlierVariance # toConstr :: OutlierVariance -> Constr # dataTypeOf :: OutlierVariance -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c OutlierVariance) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c OutlierVariance) # gmapT :: (forall b. Data b => b -> b) -> OutlierVariance -> OutlierVariance # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> OutlierVariance -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> OutlierVariance -> r # gmapQ :: (forall d. Data d => d -> u) -> OutlierVariance -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> OutlierVariance -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> OutlierVariance -> m OutlierVariance # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> OutlierVariance -> m OutlierVariance # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> OutlierVariance -> m OutlierVariance #
Read OutlierVariance # |
Methods readsPrec :: Int -> ReadS OutlierVariance # readList :: ReadS [OutlierVariance] # readPrec :: ReadPrec OutlierVariance # readListPrec :: ReadPrec [OutlierVariance] #
Show OutlierVariance # |
Methods showsPrec :: Int -> OutlierVariance -> ShowS # show :: OutlierVariance -> String # showList :: [OutlierVariance] -> ShowS #
Generic OutlierVariance # |
Associated Types type Rep OutlierVariance :: * -> * # Methods from :: OutlierVariance -> Rep OutlierVariance x # to :: Rep OutlierVariance x -> OutlierVariance #
NFData OutlierVariance # |
Methods rnf :: OutlierVariance -> () #
FromJSON OutlierVariance # |
Methods parseJSON :: Value -> Parser OutlierVariance # parseJSONList :: Value -> Parser [OutlierVariance] #
ToJSON OutlierVariance # |
Methods toJSON :: OutlierVariance -> Value # toEncoding :: OutlierVariance -> Encoding # toJSONList :: [OutlierVariance] -> Value # toEncodingList :: [OutlierVariance] -> Encoding #
Binary OutlierVariance # |
Methods put :: OutlierVariance -> Put # get :: Get OutlierVariance # putList :: [OutlierVariance] -> Put #
type Rep OutlierVariance # |
type Rep OutlierVariance = D1 (MetaData "OutlierVariance" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "OutlierVariance" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "ovEffect") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 OutlierEffect)) ((:*:) (S1 (MetaSel (Just Symbol "ovDesc") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Just Symbol "ovFraction") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double)))))

data Regression #

Results of a linear regression.

Constructors

Regression |
Fields regResponder :: String Name of the responding variable. regCoeffs :: Map String Estimate Map from name to value of predictor coefficients. regRSquare :: Estimate R² goodness-of-fit estimate.

Instances

Eq Regression # |
Methods (==) :: Regression -> Regression -> Bool # (/=) :: Regression -> Regression -> Bool #
Data Regression # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Regression -> c Regression # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Regression # toConstr :: Regression -> Constr # dataTypeOf :: Regression -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Regression) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Regression) # gmapT :: (forall b. Data b => b -> b) -> Regression -> Regression # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Regression -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Regression -> r # gmapQ :: (forall d. Data d => d -> u) -> Regression -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Regression -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Regression -> m Regression # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Regression -> m Regression # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Regression -> m Regression #
Read Regression # |
Methods readsPrec :: Int -> ReadS Regression # readList :: ReadS [Regression] # readPrec :: ReadPrec Regression # readListPrec :: ReadPrec [Regression] #
Show Regression # |
Methods showsPrec :: Int -> Regression -> ShowS # show :: Regression -> String # showList :: [Regression] -> ShowS #
Generic Regression # |
Associated Types type Rep Regression :: * -> * # Methods from :: Regression -> Rep Regression x # to :: Rep Regression x -> Regression #
NFData Regression # |
Methods rnf :: Regression -> () #
FromJSON Regression # |
Methods parseJSON :: Value -> Parser Regression # parseJSONList :: Value -> Parser [Regression] #
ToJSON Regression # |
Methods toJSON :: Regression -> Value # toEncoding :: Regression -> Encoding # toJSONList :: [Regression] -> Value # toEncodingList :: [Regression] -> Encoding #
Binary Regression # |
Methods put :: Regression -> Put # get :: Get Regression # putList :: [Regression] -> Put #
type Rep Regression # |
type Rep Regression = D1 (MetaData "Regression" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "Regression" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "regResponder") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) ((:*:) (S1 (MetaSel (Just Symbol "regCoeffs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map String Estimate))) (S1 (MetaSel (Just Symbol "regRSquare") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Estimate)))))

data KDE #

Data for a KDE chart of performance.

Constructors

KDE |
Fields kdeType :: String kdeValues :: Vector Double kdePDF :: Vector Double

Instances

Eq KDE # |
Methods (==) :: KDE -> KDE -> Bool # (/=) :: KDE -> KDE -> Bool #
Data KDE # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KDE -> c KDE # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c KDE # toConstr :: KDE -> Constr # dataTypeOf :: KDE -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c KDE) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KDE) # gmapT :: (forall b. Data b => b -> b) -> KDE -> KDE # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KDE -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KDE -> r # gmapQ :: (forall d. Data d => d -> u) -> KDE -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> KDE -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> KDE -> m KDE # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KDE -> m KDE # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KDE -> m KDE #
Read KDE # |
Methods readsPrec :: Int -> ReadS KDE # readList :: ReadS [KDE] # readPrec :: ReadPrec KDE # readListPrec :: ReadPrec [KDE] #
Show KDE # |
Methods showsPrec :: Int -> KDE -> ShowS # show :: KDE -> String # showList :: [KDE] -> ShowS #
Generic KDE # |
Associated Types type Rep KDE :: * -> * # Methods from :: KDE -> Rep KDE x # to :: Rep KDE x -> KDE #
NFData KDE # |
Methods rnf :: KDE -> () #
FromJSON KDE # |
Methods parseJSON :: Value -> Parser KDE # parseJSONList :: Value -> Parser [KDE] #
ToJSON KDE # |
Methods toJSON :: KDE -> Value # toEncoding :: KDE -> Encoding # toJSONList :: [KDE] -> Value # toEncodingList :: [KDE] -> Encoding #
Binary KDE # |
Methods put :: KDE -> Put # get :: Get KDE # putList :: [KDE] -> Put #
type Rep KDE # |
type Rep KDE = D1 (MetaData "KDE" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "KDE" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "kdeType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) ((:*:) (S1 (MetaSel (Just Symbol "kdeValues") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector Double))) (S1 (MetaSel (Just Symbol "kdePDF") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector Double))))))

data Report #

Report of a sample analysis.

Constructors

Report |
Fields reportNumber :: Int A simple index indicating that this is the nth report. reportName :: String The name of this report. reportKeys :: [String] See `measureKeys`. reportMeasured :: Vector Measured Raw measurements. These are not corrected for the estimated measurement overhead that can be found via the `anOverhead` field of `reportAnalysis`. reportAnalysis :: SampleAnalysis Report analysis. reportOutliers :: Outliers Analysis of outliers. reportKDEs :: [KDE] Data for a KDE of times.

Instances

Eq Report # |
Methods (==) :: Report -> Report -> Bool # (/=) :: Report -> Report -> Bool #
Data Report # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Report -> c Report # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Report # toConstr :: Report -> Constr # dataTypeOf :: Report -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Report) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Report) # gmapT :: (forall b. Data b => b -> b) -> Report -> Report # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Report -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Report -> r # gmapQ :: (forall d. Data d => d -> u) -> Report -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Report -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Report -> m Report # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Report -> m Report # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Report -> m Report #
Read Report # |
Methods readsPrec :: Int -> ReadS Report # readList :: ReadS [Report] # readPrec :: ReadPrec Report # readListPrec :: ReadPrec [Report] #
Show Report # |
Methods showsPrec :: Int -> Report -> ShowS # show :: Report -> String # showList :: [Report] -> ShowS #
Generic Report # |
Associated Types type Rep Report :: * -> * # Methods from :: Report -> Rep Report x # to :: Rep Report x -> Report #
NFData Report # |
Methods rnf :: Report -> () #
FromJSON Report # |
Methods parseJSON :: Value -> Parser Report # parseJSONList :: Value -> Parser [Report] #
ToJSON Report # |
Methods toJSON :: Report -> Value # toEncoding :: Report -> Encoding # toJSONList :: [Report] -> Value # toEncodingList :: [Report] -> Encoding #
Binary Report # |
Methods put :: Report -> Put # get :: Get Report # putList :: [Report] -> Put #
type Rep Report # |
type Rep Report = D1 (MetaData "Report" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "Report" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "reportNumber") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) ((:*:) (S1 (MetaSel (Just Symbol "reportName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Just Symbol "reportKeys") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "reportMeasured") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector Measured))) (S1 (MetaSel (Just Symbol "reportAnalysis") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SampleAnalysis))) ((:*:) (S1 (MetaSel (Just Symbol "reportOutliers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Outliers)) (S1 (MetaSel (Just Symbol "reportKDEs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [KDE]))))))

data SampleAnalysis #

Result of a bootstrap analysis of a non-parametric sample.

Constructors

SampleAnalysis |
Fields anRegress :: [Regression] Estimates calculated via linear regression. anOverhead :: Double Estimated measurement overhead, in seconds. Estimation is performed via linear regression. anMean :: Estimate Estimated mean. anStdDev :: Estimate Estimated standard deviation. anOutlierVar :: OutlierVariance Description of the effects of outliers on the estimated variance.

Instances

Eq SampleAnalysis # |
Methods (==) :: SampleAnalysis -> SampleAnalysis -> Bool # (/=) :: SampleAnalysis -> SampleAnalysis -> Bool #
Data SampleAnalysis # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SampleAnalysis -> c SampleAnalysis # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SampleAnalysis # toConstr :: SampleAnalysis -> Constr # dataTypeOf :: SampleAnalysis -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c SampleAnalysis) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SampleAnalysis) # gmapT :: (forall b. Data b => b -> b) -> SampleAnalysis -> SampleAnalysis # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SampleAnalysis -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SampleAnalysis -> r # gmapQ :: (forall d. Data d => d -> u) -> SampleAnalysis -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> SampleAnalysis -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> SampleAnalysis -> m SampleAnalysis # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SampleAnalysis -> m SampleAnalysis # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SampleAnalysis -> m SampleAnalysis #
Read SampleAnalysis # |
Methods readsPrec :: Int -> ReadS SampleAnalysis # readList :: ReadS [SampleAnalysis] # readPrec :: ReadPrec SampleAnalysis # readListPrec :: ReadPrec [SampleAnalysis] #
Show SampleAnalysis # |
Methods showsPrec :: Int -> SampleAnalysis -> ShowS # show :: SampleAnalysis -> String # showList :: [SampleAnalysis] -> ShowS #
Generic SampleAnalysis # |
Associated Types type Rep SampleAnalysis :: * -> * # Methods from :: SampleAnalysis -> Rep SampleAnalysis x # to :: Rep SampleAnalysis x -> SampleAnalysis #
NFData SampleAnalysis # |
Methods rnf :: SampleAnalysis -> () #
FromJSON SampleAnalysis # |
Methods parseJSON :: Value -> Parser SampleAnalysis # parseJSONList :: Value -> Parser [SampleAnalysis] #
ToJSON SampleAnalysis # |
Methods toJSON :: SampleAnalysis -> Value # toEncoding :: SampleAnalysis -> Encoding # toJSONList :: [SampleAnalysis] -> Value # toEncodingList :: [SampleAnalysis] -> Encoding #
Binary SampleAnalysis # |
Methods put :: SampleAnalysis -> Put # get :: Get SampleAnalysis # putList :: [SampleAnalysis] -> Put #
type Rep SampleAnalysis # |
type Rep SampleAnalysis = D1 (MetaData "SampleAnalysis" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) (C1 (MetaCons "SampleAnalysis" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "anRegress") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Regression])) (S1 (MetaSel (Just Symbol "anOverhead") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Double))) ((:*:) (S1 (MetaSel (Just Symbol "anMean") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Estimate)) ((:*:) (S1 (MetaSel (Just Symbol "anStdDev") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Estimate)) (S1 (MetaSel (Just Symbol "anOutlierVar") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 OutlierVariance))))))

data DataRecord #

Constructors

Measurement Int String (Vector Measured) |
Analysed Report |

Instances

Eq DataRecord # |
Methods (==) :: DataRecord -> DataRecord -> Bool # (/=) :: DataRecord -> DataRecord -> Bool #
Data DataRecord # |
Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> DataRecord -> c DataRecord # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c DataRecord # toConstr :: DataRecord -> Constr # dataTypeOf :: DataRecord -> DataType # dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c DataRecord) # dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c DataRecord) # gmapT :: (forall b. Data b => b -> b) -> DataRecord -> DataRecord # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> DataRecord -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> DataRecord -> r # gmapQ :: (forall d. Data d => d -> u) -> DataRecord -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> DataRecord -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> DataRecord -> m DataRecord # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> DataRecord -> m DataRecord # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> DataRecord -> m DataRecord #
Read DataRecord # |
Methods readsPrec :: Int -> ReadS DataRecord # readList :: ReadS [DataRecord] # readPrec :: ReadPrec DataRecord # readListPrec :: ReadPrec [DataRecord] #
Show DataRecord # |
Methods showsPrec :: Int -> DataRecord -> ShowS # show :: DataRecord -> String # showList :: [DataRecord] -> ShowS #
Generic DataRecord # |
Associated Types type Rep DataRecord :: * -> * # Methods from :: DataRecord -> Rep DataRecord x # to :: Rep DataRecord x -> DataRecord #
NFData DataRecord # |
Methods rnf :: DataRecord -> () #
FromJSON DataRecord # |
Methods parseJSON :: Value -> Parser DataRecord # parseJSONList :: Value -> Parser [DataRecord] #
ToJSON DataRecord # |
Methods toJSON :: DataRecord -> Value # toEncoding :: DataRecord -> Encoding # toJSONList :: [DataRecord] -> Value # toEncodingList :: [DataRecord] -> Encoding #
Binary DataRecord # |
Methods put :: DataRecord -> Put # get :: Get DataRecord # putList :: [DataRecord] -> Put #
type Rep DataRecord # |
type Rep DataRecord = D1 (MetaData "DataRecord" "Criterion.Types" "criterion-1.1.4.0-AKS5xKhCCuh8b7vOebgnFC" False) ((:+:) (C1 (MetaCons "Measurement" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Vector Measured)))))) (C1 (MetaCons "Analysed" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Report))))