Module

Benchotron.BenchmarkJS

Package
purescript-benchotron
Repository
hdgarrood/purescript-benchotron

#BenchmarkJS Source

#Stats Source

type Stats = { deviation :: Number, mean :: Number, moe :: Number, rme :: Number, sample :: Array Number, sem :: Number, variance :: Number }

#monkeyPatchBenchmark Source

monkeyPatchBenchmark :: BenchmarkJS -> Effect Unit

This is (unfortunately) necessary to stop Benchmark from trying to decompile your functions to Strings, and then using 'eval' in the tests. I'm not quite sure why it does this, but it breaks things, due to imported modules no longer being in scope :(

Here, we monkey-patch the Benchmark object to fool the library into thinking function decompilation is not supported, which should hopefully stop this from happening.

#runBenchmarkImpl Source