duanhuau567787 2016-06-05 09:44
浏览 71
已采纳

Gearman和xdebug

I have something that I don't quite understand with the library and debugging it - having run xdebug profiling on the CLI gearman task it states that it runs for a total of 5.5 seconds as a result of xdebug's cachegrind file. What I have is a code that contacts external web service, fetches data and retrieves relevant datasets from our database. In total, it safely can process about 300 odd records. I set the timeout on gearman worker to 20 seconds and tries to increase the limit to 400 but alas it is not enough time to process this many records. My conundrum is this - why is xdebug states it only takes 5.5 seconds to run the code that gets 300 records, while gearman times out if it's increased to 400, meaning it takes MORE than 20 seconds to do that? Sometimes it times out on 320, or 310, I just picked 400 as marginal example guaranteed to timeout. Has anyone got any suggestions?

  • 写回答

1条回答 默认 最新

  • drpjdfj618393 2017-02-07 00:00
    关注

    Having set up XHPROF we can now clearly see, without the need for xDebug, precise details of what is being called and for how long it is running.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部