-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hey @ZenVoich, I've been thinking of ways to benchmark stable memory and monitor the memory efficiency of certain data-structures over time. With stable memory Regions we have more granular control on memory and thus can track it more precisely. I'm proposing a feature in mops that allows you to create custom benchmarks, to allow users to return their own values in the benchmark results. In my case I would be outputting the stable region metrics (allocated bytes, freed bytes, ...) in each columns. There would probably be some additional implementation caveats that i'm missing, but i think creating a new CustomBench
class that is exported from the mo:bench
library and has a runner()
method that returns an integer value in the callback function would suffice.
runner : (fn : (row : Text, col : Text) -> ()) -> ()
becomes
runner : (fn : (row : Text, col : Text) -> (Int)) -> ()
Do you think this is a feature worth implementing?