criterion-0.5.0.10: Robust, reliable performance measurement and analysis

Portability | GHC
Stability | experimental
Maintainer | bos@serpentine.com

Criterion.Config

Description

Benchmarking configuration.

Synopsis

- data Config = Config {
  - cfgBanner :: Last String
  - cfgConfInterval :: Last Double
  - cfgPerformGC :: Last Bool
  - cfgPlot :: MultiMap Plot PlotOutput
  - cfgPlotSameAxis :: Last Bool
  - cfgPrintExit :: PrintExit
  - cfgResamples :: Last Int
  - cfgSamples :: Last Int
  - cfgSummaryFile :: Last FilePath
  - cfgVerbosity :: Last Verbosity
  }
- data PlotOutput
  - = CSV
  - | PDF Int Int
  - | PNG Int Int
  - | SVG Int Int
  - | Window Int Int
- data Plot
  - = KernelDensity
  - | Timing
- data PrintExit
  - = Nada
  - | List
  - | Version
  - | Help
- data Verbosity
  - = Quiet
  - | Normal
  - | Verbose
- defaultConfig :: Config
- fromLJ :: (Config -> Last a) -> Config -> a
- ljust :: a -> Last a

# Documentation

data Config

Top-level program configuration.

Constructors

Config |

Fields

cfgBanner :: Last String

  The "version" banner to print.

cfgConfInterval :: Last Double

  Confidence interval to use.

cfgPerformGC :: Last Bool

  Whether to run the GC between passes.

cfgPlot :: MultiMap Plot PlotOutput

  What to plot, and where.

cfgPlotSameAxis :: Last Bool
cfgPrintExit :: PrintExit

  Whether to print information and exit.

cfgResamples :: Last Int

  Number of resamples to perform.

cfgSamples :: Last Int

  Number of samples to collect.

cfgSummaryFile :: Last FilePath

  Filename of summary CSV

cfgVerbosity :: Last Verbosity

  Whether to run verbosely.

Instances

Eq Config |
Read Config |
Show Config |
Typeable Config |
Monoid Config |
MonadReader Config Criterion |

data PlotOutput

Supported plot outputs. Some outputs support width and height in varying units. A point is 1/72 of an inch (0.353mm).

Constructors

CSV | Textual CSV file.
PDF Int Int | PDF file, dimensions in points.
PNG Int Int | PNG file, dimensions in pixels.
SVG Int Int | SVG file, dimensions in points.
Window Int Int | Display in a window, dimensions in pixels.

Instances

Eq PlotOutput |
Ord PlotOutput |
Read PlotOutput |
Show PlotOutput |
Typeable PlotOutput |

data Plot

What to plot.

Constructors

KernelDensity | Kernel density estimate of probabilities.
Timing | Benchmark timings.

Instances

Eq Plot |
Ord Plot |
Read Plot |
Show Plot |
Typeable Plot |

data PrintExit

Print some information and exit, without running any benchmarks.

Constructors

Nada | Do not actually print-and-exit. (Default.)
List | Print a list of known benchmarks.
Version | Print version information (if known).
Help | Print a help/usaage message.

Instances

Bounded PrintExit |
Enum PrintExit |
Eq PrintExit |
Ord PrintExit |
Read PrintExit |
Show PrintExit |
Typeable PrintExit |
Monoid PrintExit |

data Verbosity

Control the amount of information displayed.

Constructors

Quiet |
Normal |
Verbose |

Instances

Bounded Verbosity |
Enum Verbosity |
Eq Verbosity |
Ord Verbosity |
Read Verbosity |
Show Verbosity |
Typeable Verbosity |

defaultConfig :: Config

A configuration with sensible defaults.

fromLJ

Arguments

:: (Config -> Last a) | Field to access.
-> Config | Default to use.
-> a |

Deconstructor for `Last` values.

ljust :: a -> Last a

Constructor for `Last` values.