Track memory usage of a method

后端 未结 6 2173
[愿得一人]
[愿得一人] 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:46

    You should use a php memory tool.

    There is a nice one to be found in this SO thread: Tools to visually analyze memory usage of a PHP app

    this other question holds some further answers regarding your question

提交回复
热议问题