big_O icon indicating copy to clipboard operation
big_O copied to clipboard

`return_raw_data` should include all timings (for `n_repeats`)

Open DanielHabenicht opened this issue 2 years ago • 0 comments

It would be nice if all of the raw data could be passed back if requested instead of only the minimum (for executions with n_repeats>1)

https://github.com/pberkes/big_O/blob/d7004253ddd62c6d19e66d1e0ceead77a79bc615/big_o/big_o.py#L61

So one could calculate standard deviation for the runs or perform other actions with it.

While at it it might be good idea to pass the raw data back in an extra variable instead adding it to the fitted dictionary:

https://github.com/pberkes/big_O/blob/d7004253ddd62c6d19e66d1e0ceead77a79bc615/big_o/big_o.py#L171-L175

Idea:

return_values = (best, fitted)
if return_raw_data:
    return_values = (best, fitted, {
         'measures' = ns,
         'times' = time
    })
return return_values

Happy to provide a PR!

DanielHabenicht avatar Nov 15 '22 18:11 DanielHabenicht