NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
Indeed the functions are for profiling part(s) of code.
As of protocol, you'll waste a lot of time trying to reengineer it (which is not so legal btw). And what is it for? You will try to re-implement all logic behind dbglistener and PhpED? In what direction data exported from PhpED will differ from data that would be stored by your potential interceptor that you're trying to develop?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 30 Jun 2009
Posts: 80
Reply with quote
@dmitri

No, I am not going to do that. It was an attempt out of desperation. All I want is to be able to profile my code without running dbg listener (just the way XDebug does).

So, I'm looking for your help. Can you answer the following question?

Is it possible to use the combination of dbg_startprofiler() / dbg_stopprofiler() around a piece of code I want to profile and then use dbg_get_profiler_results($results) to retrieve profiling data.

That's all.
View user's profileFind all posts by temuriSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
I don't see any advantages of storing data in a file on the server. You'll have to get it back to the client, then analyze and what you'll have in the result is exactly what you already have in the IDE. Why bother? If you think that the IDE gets more raw data and can show more than it shows, you're wrong.

As of those functions, they are just filters to temporary disable/enable gathering time. They do neither start nor stop the profiler. Profiler as well as debugger can't work without connection to the IDE. It's IDE sends commands and receives the results.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 30 Jun 2009
Posts: 80
Reply with quote
I'll explain my goal.

I was running apache benchmark (ab) tool with various requests/concurrency settings. I was using XDebug output to analyze the performance behaviour delta in several classes (class loader, ACL, Models, Navigation) under growing server load.

Then I asked myself - can I do it with dbg, avoiding remote connection to the listener.

Do you follow my logic?

So, it would be very nice if dbg could dump profiling results to file on disk. I don't see that as an impossible task, because PHPEd itself does not measure anything. It should be just a matter of redirecting output.

Thanks
View user's profileFind all posts by temuriSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7857
Reply with quote
ab is not a right tool to measure anything close to reality. It runs the same HTTP request multiple times which effectively re-uses caches (file system's and db's) starting with the 2nd request, so the ab results are always screwed.
Regarding xdebug, if you can do that in this tool, why do you need the same functionality in dbg? I think we better focus on something unique that is not available in xdebug.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Remote profiling
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 2 of 2  

  
  
 Reply to topic