BitOne / php-meminfo

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

Added a diff command to compare 2 memory dumps #56

Open oliverde8 opened 6 years ago

oliverde8 commented 6 years ago

Hi,

First thanks for this tool, it really is awesome.

I found myself comparing 2 dump on a few occasions and trying to see where I am leaking. So I thought it would be a nice feature to have in the analyzer.

Regards

oliverde8 commented 6 years ago

Hi,

And ideas why the test didn't pass? It looks like a timeout to me.

BitOne commented 6 years ago

Hey, thanks a lot @oliverde8 !

And sorry for the delay before the answer. I will have a look at the test failure, I think it's related to some changes in PHP 7.2, not from your code.

I think that your diff is a great feature, very useful in the hunting memory leak process.

But could you put the diff generation part in a dedicated class, like a SummaryDiffer ? This class would take two summaries and generate a diff.

This would make testing much easier than having everything in the command. And by the way, if you could make the associated Spec, that would be awesome ;)

Thank you!

oliverde8 commented 6 years ago

Hi,

Np, thanks for the response.

I hadn't seen the Spec's, my bad. I will update it, just not sure when I will find time.

Regards