arnaud-lb / php-memory-profiler

Memory profiler for PHP. Helps finding memory leaks in PHP scripts.
MIT License
858 stars 51 forks source link

Change the dump format in dump_on_limit to pprof #101

Open melkamar opened 4 months ago

melkamar commented 4 months ago

Description

Hi, first off, thank you for the extension, it's awesome!

Based on reading the documentation and skimming the source code, am I right to conclude that the dump_on_limit operation mode can currently only output the callgrind-format file? If I want a pprof-format, I can only do that by inserting explicit memprof_dump_pprof () calls to the code?

It would be great if this could be customized and the default format for the dump_on_limit could be changed to be readable by pprof, if possible.

Thanks again

arnaud-lb commented 4 months ago

Hi!

Since https://github.com/arnaud-lb/php-memory-profiler/pull/97, this can be customized with the memprof.output_format setting. There were no pecl release since then, however, so this will only work in manual installs.