Add `benchmarkWith`
Add a function that returns the result along the Stats, and specialize benchmark in terms of this one.
Addresses #9
Edit : I believe this needs a bit of background; while developing a library for nearest neighbors search I needed a way to benchmark retrieval accuracy against throughput. Since these depend on a number of internal parameters, one needs to collect timings alongside numerical results, so this is how this patch was born.
I look forward to all feedback. Thanks!
Sorry - I must have missed this when you originally opened it!
I feel like it is a bit odd that this would only return the first result, and makes me think it should be more general (i.e. return all results, or take a callback function that gets passed results).
To understand your use-case better, could you share your example code please?
Hi :) You're right, keeping only the head of the results list doesn't look good. It should be the responsibility of the user code to do that, if at all.