Chris00 / ocaml-benchmark

Benchmarking module for OCaml
GNU Lesser General Public License v3.0
28 stars 7 forks source link

Lwt support #10

Open g2p opened 6 years ago

g2p commented 6 years ago

I'd like to use Benchmark to benchmark within an Lwt main loop.

I can't just benchmark a function that calls Lwt_main.run because I have some expensive initialisation done within the Lwt monad, so I need to add the functionality to Benchmark itself. Feel free to come up with advice if you want.

Chris00 commented 5 years ago

Have not thought much about it but how can you measure the time spend by a function if the computation can switch to another function in the process? Some help from Lwt is needed I think.