-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Reliable performance measurement with robust data export. -- -- Please see README.md @package hyperion @version 0.1.0.0 module Hyperion.Measurement data Measurement Measurement :: {-# UNPACK #-} !Int64 -> {-# UNPACK #-} !Int64 -> Measurement [_batchSize] :: Measurement -> {-# UNPACK #-} !Int64 [_duration] :: Measurement -> {-# UNPACK #-} !Int64 batchSize :: Lens' Measurement Int64 duration :: Lens' Measurement Int64 newtype Sample Sample :: Vector Measurement -> Sample [_measurements] :: Sample -> Vector Measurement measurements :: Iso' Sample (Vector Measurement) instance Data.Aeson.Types.FromJSON.FromJSON Hyperion.Measurement.Sample instance Data.Aeson.Types.ToJSON.ToJSON Hyperion.Measurement.Sample instance Data.Vector.Generic.Mutable.Base.MVector Data.Vector.Unboxed.Base.MVector Hyperion.Measurement.Measurement instance Data.Vector.Generic.Base.Vector Data.Vector.Unboxed.Base.Vector Hyperion.Measurement.Measurement instance GHC.Show.Show Hyperion.Measurement.Sample instance GHC.Classes.Ord Hyperion.Measurement.Sample instance GHC.Base.Monoid Hyperion.Measurement.Sample instance GHC.Classes.Eq Hyperion.Measurement.Sample instance Data.Aeson.Types.ToJSON.ToJSON Hyperion.Measurement.Measurement instance Data.Aeson.Types.FromJSON.FromJSON Hyperion.Measurement.Measurement instance Data.Vector.Unboxed.Base.Unbox Hyperion.Measurement.Measurement instance GHC.Show.Show Hyperion.Measurement.Measurement instance GHC.Classes.Ord Hyperion.Measurement.Measurement instance GHC.Classes.Eq Hyperion.Measurement.Measurement module Hyperion.Internal newtype Batch a Batch :: State (Int64 -> IO ()) a -> Batch a [unBatch] :: Batch a -> State (Int64 -> IO ()) a -- | Run a batch of the given size. runBatch :: Batch () -> Int64 -> IO () data Env r Empty :: Env r Resource :: r -> Env r use :: Env r -> Batch r data Parameter Parameter :: a -> Parameter data Component BenchC :: Text -> Component GroupC :: Text -> Component SeriesC :: Parameter -> Component newtype BenchmarkId BenchmarkId :: [Component] -> BenchmarkId renderBenchmarkId :: BenchmarkId -> Text benchmarkParameters :: BenchmarkId -> [Parameter] instance GHC.Classes.Ord Hyperion.Internal.BenchmarkId instance GHC.Classes.Eq Hyperion.Internal.BenchmarkId instance GHC.Classes.Ord Hyperion.Internal.Component instance GHC.Classes.Eq Hyperion.Internal.Component instance GHC.Base.Monad Hyperion.Internal.Batch instance GHC.Base.Applicative Hyperion.Internal.Batch instance GHC.Base.Functor Hyperion.Internal.Batch instance GHC.Classes.Eq Hyperion.Internal.Parameter instance GHC.Classes.Ord Hyperion.Internal.Parameter instance Data.Hashable.Class.Hashable Hyperion.Internal.BenchmarkId instance GHC.Show.Show Hyperion.Internal.BenchmarkId module Hyperion.Report data Report Report :: !Text -> [Int] -> !Double -> !(Maybe Double) -> !(Maybe Int64) -> !(Maybe Int64) -> !(Maybe Sample) -> Report [_reportBenchName] :: Report -> !Text [_reportBenchParams] :: Report -> [Int] [_reportTimeInNanos] :: Report -> !Double [_reportCycles] :: Report -> !(Maybe Double) [_reportAlloc] :: Report -> !(Maybe Int64) [_reportGarbageCollections] :: Report -> !(Maybe Int64) [_reportMeasurements] :: Report -> !(Maybe Sample) reportTimeInNanos :: Lens' Report Double reportMeasurements :: Lens' Report (Maybe Sample) reportGarbageCollections :: Lens' Report (Maybe Int64) reportCycles :: Lens' Report (Maybe Double) reportBenchParams :: Lens' Report [Int] reportBenchName :: Lens' Report Text reportAlloc :: Lens' Report (Maybe Int64) json :: Object -> HashMap BenchmarkId Report -> Value jsonFlat :: Object -> HashMap BenchmarkId Report -> Value instance Data.Aeson.Types.ToJSON.ToJSON Hyperion.Report.Report instance Data.Aeson.Types.FromJSON.FromJSON Hyperion.Report.Report instance GHC.Generics.Generic Hyperion.Report.Report module Hyperion.PrintReport printReports :: HashMap BenchmarkId Report -> IO () module Hyperion.Benchmark data Benchmark [Bench] :: Text -> Batch () -> Benchmark [Group] :: Text -> [Benchmark] -> Benchmark [Bracket] :: NFData r => IO r -> (r -> IO ()) -> (Env r -> Benchmark) -> Benchmark [Series] :: (Show a, Enum a) => Vector a -> (a -> Benchmark) -> Benchmark bench :: String -> Batch () -> Benchmark bgroup :: String -> [Benchmark] -> Benchmark env :: NFData r => IO r -> (r -> IO ()) -> (Env r -> Benchmark) -> Benchmark series :: (Show a, Enum a) => Vector a -> (a -> Benchmark) -> Benchmark data Batch a -- | Run a batch of the given size. runBatch :: Batch () -> Int64 -> IO () -- | Apply an argument to a function, and evaluate the result to head -- normal form (NF). nf :: NFData b => (a -> b) -> a -> Batch () -- | 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. nfIO :: NFData a => IO a -> Batch () -- | Apply an argument to a function, and evaluate the result to weak head -- normal form (WHNF). whnf :: (a -> b) -> a -> Batch () -- | 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. whnfIO :: IO a -> Batch () data Env r use :: Env r -> Batch r instance GHC.Show.Show Hyperion.Benchmark.Benchmark module Hyperion.Analysis data Parameter Parameter :: a -> Parameter identifiers :: Fold Benchmark BenchmarkId analyze :: BenchmarkId -> Sample -> Report -- | Run a hierarchical benchmark suite, collecting results. module Hyperion.Run -- | Provided a sampling strategy (which can be keyed on the -- BenchmarkId), sample the runtime of all the benchmark cases in -- the given benchmark tree. runBenchmark :: (BenchmarkId -> Maybe SamplingStrategy) -> Benchmark -> IO (HashMap BenchmarkId Sample) -- | Convenience wrapper around shuffle. shuffle :: RandomGen g => g -> [a] -> [a] reorder :: RandomGen g => (g -> [Benchmark] -> [Benchmark]) -> (g -> [Benchmark] -> [Benchmark]) -- | Sampling strategies that filters the benchmarks based on a predicate: -- a benchmark is included iff the predicate is True. filtered :: (BenchmarkId -> Bool) -> SamplingStrategy -> (BenchmarkId -> Maybe SamplingStrategy) -- | Sampling strategies that ignore the name index, i.e. are uniform -- across all benchmarks. uniform :: SamplingStrategy -> (BenchmarkId -> Maybe SamplingStrategy) -- | Sampling strategy. newtype SamplingStrategy SamplingStrategy :: (Batch () -> IO Sample) -> SamplingStrategy -- | Default to 100 samples, for each batch size from 1 to 20 with a -- geometric progression of 1.2. defaultStrategy :: SamplingStrategy -- | Sample once a batch of fixed size. fixed :: Int64 -> SamplingStrategy -- | Run a sampling strategy n times. sample :: Int64 -> SamplingStrategy -> SamplingStrategy -- | Batching strategy, following a geometric progression from 1 to the -- provided limit, with the given ratio. geometric :: Int64 -> Int64 -> Double -> SamplingStrategy -- | Sampling strategy that creates samples of the specified sizes with a -- time bound. Sampling stops when either a sample has been sampled for -- each size or when the total benchmark time is greater than the -- specified time bound. -- -- The actual amount of time spent may be longer since hyperion will -- always wait for a Sample of a given size to complete. timeBound :: TimeSpec -> [Int64] -> SamplingStrategy geometricSeries :: Double -> Int64 -> [Int64] instance GHC.Show.Show Hyperion.Run.SamplingStrategy instance GHC.Base.Monoid Hyperion.Run.SamplingStrategy instance Control.Monad.Trans.Class.MonadTrans (Hyperion.Run.StateT' s) instance GHC.Base.Monad m => Control.Monad.State.Class.MonadState s (Hyperion.Run.StateT' s m) instance Control.Monad.Catch.MonadThrow m => Control.Monad.Catch.MonadThrow (Hyperion.Run.StateT' s m) instance Control.Monad.Catch.MonadMask m => Control.Monad.Catch.MonadMask (Hyperion.Run.StateT' s m) instance Control.Monad.Catch.MonadCatch m => Control.Monad.Catch.MonadCatch (Hyperion.Run.StateT' s m) instance GHC.Base.Monad m => GHC.Base.Monad (Hyperion.Run.StateT' s m) instance GHC.Base.Monad m => GHC.Base.Applicative (Hyperion.Run.StateT' s m) instance GHC.Base.Functor m => GHC.Base.Functor (Hyperion.Run.StateT' s m) instance (GHC.Base.Monad m, GHC.Base.Monoid a) => GHC.Base.Monoid (Hyperion.Run.StateT' s m a) module Hyperion.Main defaultMain :: String -> [Benchmark] -> IO () data Mode Version :: Mode List :: Mode Run :: Mode Analyze :: Mode data ConfigMonoid ConfigMonoid :: [ReportOutput FilePath] -> First Mode -> First Bool -> First SamplingStrategy -> Object -> [Text] -> ConfigMonoid [configMonoidReportOutputs] :: ConfigMonoid -> [ReportOutput FilePath] [configMonoidMode] :: ConfigMonoid -> First Mode [configMonoidRaw] :: ConfigMonoid -> First Bool [configMonoidSamplingStrategy] :: ConfigMonoid -> First SamplingStrategy [configMonoidUserMetadata] :: ConfigMonoid -> Object [configMonoidSelectorPatterns] :: ConfigMonoid -> [Text] -- | Specify a particular way of reporting the benchmark results. data ReportOutput a ReportPretty :: ReportOutput a ReportJson :: a -> ReportOutput a ReportJsonFlat :: a -> ReportOutput a -- | The path to the null output file. This is "nul" on Windows -- and "devnull" elsewhere. nullOutputPath :: FilePath defaultConfig :: ConfigMonoid defaultMainWith :: ConfigMonoid -> String -> [Benchmark] -> IO () instance GHC.Show.Show Hyperion.Main.Config instance GHC.Generics.Generic Hyperion.Main.Config instance GHC.Show.Show Hyperion.Main.ConfigMonoid instance GHC.Generics.Generic Hyperion.Main.ConfigMonoid instance GHC.Show.Show a => GHC.Show.Show (Hyperion.Main.ReportOutput a) instance GHC.Classes.Ord a => GHC.Classes.Ord (Hyperion.Main.ReportOutput a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Hyperion.Main.ReportOutput a) instance GHC.Base.Functor Hyperion.Main.ReportOutput instance GHC.Show.Show Hyperion.Main.Mode instance GHC.Classes.Ord Hyperion.Main.Mode instance GHC.Classes.Eq Hyperion.Main.Mode instance GHC.Base.Monoid Hyperion.Main.ConfigMonoid instance (GHC.Show.Show a, Data.Typeable.Internal.Typeable a) => GHC.Exception.Exception (Hyperion.Main.DuplicateIdentifiers a) instance GHC.Show.Show a => GHC.Show.Show (Hyperion.Main.DuplicateIdentifiers a) module Hyperion