debugging long running PHP script

后端 未结 11 2511
我寻月下人不归
我寻月下人不归 2021-02-19 06:46

I have php script running as a cron job, extensively using third party code. Script itself has a few thousands LOC. Basically it\'s the data import / treatment script. (JSON to

11条回答
  •  借酒劲吻你
    2021-02-19 07:08

    You can use https://github.com/jmartin82/phplapse to record the application activity for determinate time.

    For example start recording after n iterations with:

    phplapse_start();
    

    And stop it in next iteration with:

    phplapse_stop();
    

    With this process you was created a snapshot of execution when all seems works slow.

    (I'm the author of project, don't hesitate to contact with me to improve the functionality)

提交回复
热议问题