Track memory usage of a method

后端 未结 6 2195
[愿得一人]
[愿得一人] 2021-02-20 11:58

I have yet to find an elegant solution for this. I have a class with a method I want to track the memory usage of without modifying the function:

class Example
{         


        
6条回答
  •  心在旅途
    2021-02-20 12:57

    The only trustable method I know to achieve this is profiling with tools that are not written in php itself.

    Read this:

    http://www.xdebug.org/docs/profiler

提交回复
热议问题