Module
Benchotron.BenchmarkJS
- Package
- purescript-benchotron
- Repository
- hdgarrood/purescript-benchotron
#BenchmarkJS Source
data BenchmarkJS :: Type
#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
runBenchmarkImpl :: BenchmarkJS -> (Unit -> Any) -> Effect Stats