NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Invoke memory profile with debugbreak()


Joined: 21 Oct 2007
Posts: 14
Reply with quote
Hello

I often use debugbreak('1@127.0.0.1:7869;d=1,p=1'); to invoke the debugger for profiling Ajax callbacks.

Note, I use the debugger on a remote linux box and use SSH to tunnel back to the IDE.

What p=? value do I need to invoke the new PhpEd 14 memory profiler option? I know 16 gets SQL and 17 gets SQL etc. But cannot find docs on the memory profiler.

tia
--Andy
View user's profileFind all posts by AjKSend private message


Joined: 21 Oct 2007
Posts: 14
Reply with quote
Answer my own question

p=2 gives the Memory profiler.
p=3 gives the Line Profiler AND the Memory Profiler.

Haven't figured out how to get Line, Memory and SQL yet however (p=18 just killed it entirely)
View user's profileFind all posts by AjKSend private message


Joined: 21 Oct 2007
Posts: 14
Reply with quote
Well, having got it working seems buggy. Many negative "bytes used" appearing.

I tried to attach a screen grab but this forum's attach an image also broken.

But here's an example, minus 71.04 KB, really? Are you giving me free RAM upgrades now Nusphere?

Summary
File: <PHP Core>
<PHP Core> total: 146.7 KB
Page total: -71.04 KB
Peak memory: 14.86 MB, reached at <PHP Core>(0
View user's profileFind all posts by AjKSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
if your function takes memory, it shown as positive value. Guess what profiler shows if memory was released?
Quote:
minus 71.04 KB, really?
Why not? If you started in the middle of execution, don't be surprised to see half of the results.

As of p= flags, it is very simple. 0x001 is Line, 0x002 is Memory, and 0x010 is SQL. Select profiles you need, and OR corresponding flags, result in dec form shold be placed in p=.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Invoke memory profile with debugbreak()
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic