divan
divan copied to clipboard
feature request: clean up closure
hey there :3
thanks for provding this library, so far i've really enjoyed using it :> i really hope i didn't miss anything that this already exists sometimes i am a bit very silly when it comes to properly reading the docs.
request
adding an an optional closure that can be passed to a Bencher
that is called after each bench run through but not counted towards the measurment time. (like i guess smth like bencher.with_cleanup(closure)
that then runs somewhere at the end of bench_loop_threaded
{hope i understood the code correctly there})
motivation
i am looking into benching some sql queries and i wanted to run DISCARD
after every bench run so as to clear the caches a bit. and i think this is a general thing of wanting to clear a cache is something that comes up often in benching.
capacities on my end
i am doing this as a free time thing so i have time to look into this and can also imagine writing a pr. allthough i am not certain my code quality would be up to par but i mean i can try.
best regards