BitOne / php-meminfo

PHP extension to get insight about memory usage
MIT License
1.08k stars 78 forks source link

A way to diff two dumps #128

Closed yguedidi closed 1 year ago

yguedidi commented 1 year ago

@BitOne would it be technically possible and make sense to provide a command that does a diff of two dumps made in the same process but at different moments in time? Have a first dump that will act like a baseline and the second that may contain new objects.

Context: doing batch processing, the is a bootstrapping phase, there I'd dump the first one as the baseline. Then after each iteration, after the cleanup, I'd dump the second one. I think ideally it should be equal to the first dump if everything is cleaned up properly, right? So I want to know if it would be possible to diff the two dumps, to then analyse only on added items, the ones that are likely to leak?

yguedidi commented 1 year ago

96 does the job!