Module
BenchLib
- Package
- purescript-benchlib
- Repository
- m-bock/purescript-benchlib
#BenchResult Source
type BenchResult = { benchName :: String, samples :: Array SampleResult }
The result of a benchmark.
#CheckResults Source
type CheckResults = { groupName :: String, results :: Array CheckResult, size :: Size, success :: Boolean }
#GroupResult Source
type GroupResult = { benchResults :: Array BenchResult, checkResults :: Maybe (Array CheckResults), groupName :: String }
The result of a benchmark group.
#Reporter Source
type Reporter = { onBenchFinish :: BenchResult -> Aff Unit, onBenchStart :: String -> Aff Unit, onGroupFinish :: GroupResult -> Aff Unit, onGroupStart :: String -> Aff Unit, onSampleFinish :: SampleResult -> Aff Unit, onSampleStart :: Size -> Aff Unit, onSuiteFinish :: SuiteResult -> Aff Unit, onSuiteStart :: String -> Aff Unit }
A reporter is a set of functions that are called at different stages of the benchmark. It allows to customize the output of the benchmark suite or perform other actions like writing to a file.
#SampleResult Source
type SampleResult = { average :: Milliseconds, iterations :: Int, size :: Size }
The result of one benchmark sample.
#SuiteResult Source
type SuiteResult = { groupResults :: Array GroupResult, suiteName :: String }
The result of a benchmark suite.
#checkAllEq Source
checkAllEq :: forall a. Eq a => Array a -> Boolean
Check if all elements in the array are equal. Useful for checking the results of benchmarks.
#CanRunOnly Source
class CanRunOnly a where
A combinator for entities that can be run only once. This is useful while debugging or developing benchmarks. So you do not have to run the whole suite again and again.
Members
Instances
CanRunOnly (Bench a b)
CanRunOnly Group
#defaultReporter Source
defaultReporter :: Reporter
Default reporter useful for selective overriding. It will do nothing.
#normalizeAff Source
normalizeAff :: forall a a' b b'. (a -> Aff a') -> (b -> Aff b') -> Bench a b -> Bench a' b'
#normalizeInput Source
normalizeInput :: forall a a' b. (a -> a') -> Bench a b -> Bench a' b
#normalizeInputAff Source
normalizeInputAff :: forall a a' b. (a -> Aff a') -> Bench a b -> Bench a' b
#normalizeOutput Source
normalizeOutput :: forall a b b'. (b -> b') -> Bench a b -> Bench a b'
#normalizeOutputAff Source
normalizeOutputAff :: forall a b b'. (b -> Aff b') -> Bench a b -> Bench a b'
#reportConsole Source
reportConsole :: Reporter
Console reporter. It will print the results to the console in human readable format.