hyperion-0.1.0.0: Reliable performance measurement with robust data export.

Hyperion.Benchmark

Contents

Synopsis

# Benchmarks

data Benchmark where Source #

Constructors

 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

Instances

 Source # MethodsshowList :: [Benchmark] -> ShowS #

Arguments

 :: NFData r => IO r Acquire resource -> (r -> IO ()) Finalize resource -> (Env r -> Benchmark) -> Benchmark

series :: (Show a, Enum a) => Vector a -> (a -> Benchmark) -> Benchmark Source #

# Batches

data Batch a Source #

Instances

 Source # Methods(>>=) :: Batch a -> (a -> Batch b) -> Batch b #(>>) :: Batch a -> Batch b -> Batch b #return :: a -> Batch a #fail :: String -> Batch a # Source # Methodsfmap :: (a -> b) -> Batch a -> Batch b #(<\$) :: a -> Batch b -> Batch a # Source # Methodspure :: a -> Batch a #(<*>) :: Batch (a -> b) -> Batch a -> Batch b #(*>) :: Batch a -> Batch b -> Batch b #(<*) :: Batch a -> Batch b -> Batch a #

runBatch :: Batch () -> Int64 -> IO () Source #

Run a batch of the given size.

nf :: NFData b => (a -> b) -> a -> Batch () Source #

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

nfIO :: NFData a => IO a -> Batch () Source #

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.

whnf :: (a -> b) -> a -> Batch () Source #

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

whnfIO :: IO a -> Batch () Source #

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.

# Environments

data Env r Source #

use :: Env r -> Batch r Source #