Benchmark.Suite.Monad
- Package
- purescript-benchmark
- Repository
- cyrbon/purescript-benchmark
#on Source
on :: forall anyEff e m s. SuiteM s e m (BenchmarkEventName -> (BenchmarkEvent -> Eff anyEff Unit) -> m Unit)
Registers a listener for the specified event type(s).
#run Source
run :: forall e m s. SuiteM s e m (m Unit)
Runs the suite. This can be used inside SuiteM. Most often, you want to use
runSuiteM
instead, because SuiteM is usually used to construct the suite
and then once the suite is constructed it's run using runSuiteM
. Using
run
will run the suite during the construction process.
#accumulateResults Source
accumulateResults :: forall anyEff e m s. SuiteM s e m ((Array BenchmarkResult -> Eff anyEff Unit) -> m Unit)
Accumulates results of each cycle in an array. onComplete
calls the
provided callback with the array containing accumulated results.
#runSuiteM Source
runSuiteM :: forall a e s. SuiteT s (st :: ST s | e) a -> Eff (st :: ST s | e) Unit
Runs SuiteM transformer stack. This is equal to executing suite.run()
,
where suite is constructed via the monad interface:
runSuiteM $ do add "functionOne" myFunction add "functionTwo" myFunctionTwo
The code above will construct a suite with two functions to benchmark and run those benchmarks.