Closed NightMachinery closed 2 years ago
A place to start would be to record the max_mem_in_use_bytes
from the RTSStats
in the getStatistics
function. Then you'd need to update the maximum in the addResults
function. (If we start recording maximum values, however, the name addResults
isn't really accurate anymore, since you wouldn't add two maximum values together.)
Hi, what needs to be done here? I have this on a fork, and it seems to work as far as I can tell (work = field shows in the json output):
https://github.com/haskell/criterion/compare/master...tbidne:peak-allocated/
I'm happy to make a PR, though I'm not super familiar with criterion, so it's likely I could be missing something.
Thanks for working on this, @tbidne! Please do open a PR, as it would be more convenient to review the patch using the GitHub review UI. From a quick glance, your patch looks like what I was imagining it would be.
Fixed in #260.
Migrated from https://github.com/Gabriel439/bench/issues/45#issuecomment-1014904269 .