7 Replies - 7287 Views - Last Post: 23 May 2014 - 11:42 PM

#1 jon.kiparsky  Icon User is online

  • Chinga la migra
  • member icon


Reputation: 10732
  • View blog
  • Posts: 18,362
  • Joined: 19-March 11

Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Post icon  Posted 22 May 2014 - 11:35 AM

Trying to do some profiling, figure out where I'm losing all my time on a project. We've got webgrind up so I can look at a nice detailed view of individual runs - where did the time go on that particular run. But now that I have some ideas of what's happening, I'd like to be able to just hit the page a few hundred times and scrape the resulting data so I can see a bigger picture. (there is an intern lying around, I could make him gather the data, but that seems both cruel and inefficient)

This is sort of exploratory - I know can write tools to do this sort of thing, and I can probably figure out how to use existing log analysis tools to do it, but if there's known and tested solutions for this particular case, I'd like to use those.

To be particular, what I'd like to do is:
1. run a script to hit the page a bunch of times
2. point some tool at the cachegrind.out for the particular resources that got hit
3. get analyzable data - csv would be fine - for parameters like self-cost or inclusive cost for some particular call for each run. Included analysis and visualization tools would not be unwelcome, but the key is bulk, not individual runs. Again, big picture.

as an alternate plan, I could be happy with just 'get total inclusive and self-costs for all calls' in step 3. I can trim that down if need be.

I've found qcachegrind/kcachegrind, which has nice visualizations and profile info - like webgrind but less ugly - but so far I only see it working on one file at a time. Perhaps there's something more powerful in there that I haven't found yet.

Thanks for any tips.

Is This A Good Question/Topic? 0
  • +

Replies To: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

#2 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2343
  • View blog
  • Posts: 9,400
  • Joined: 03-December 12

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 22 May 2014 - 12:23 PM

I am guessing jMeter is outside of this boundary?
Was This Post Helpful? 1
  • +
  • -

#3 jon.kiparsky  Icon User is online

  • Chinga la migra
  • member icon


Reputation: 10732
  • View blog
  • Posts: 18,362
  • Joined: 19-March 11

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 22 May 2014 - 01:23 PM

Yeah, not really what i'm looking for. I'm already collecting the data I need through xdebug, what I need is analysis tools. For example, I'd like to plot (ratio of time spent in function A to time in function B) against total load time. That would tell me where to optimize for particular user profiles - I don't want to optimize for the long tail, because they're not using the feature, and I don't really want to optimize for the top ten users because, well, there's ten of them. So there's that right now I can only see by simulating use by individual users, which is ugh.

This might be a good addition to the arsenal, though. A way to hammer the test server and see what it does, that's nice.
Was This Post Helpful? 0
  • +
  • -

#4 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 879
  • View blog
  • Posts: 1,893
  • Joined: 30-January 09

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 22 May 2014 - 06:29 PM

Have you looked into webgrind? I haven't used it, but I'm doing light research into profilers with the view to utilising one within the next 6 months.
Was This Post Helpful? 0
  • +
  • -

#5 jon.kiparsky  Icon User is online

  • Chinga la migra
  • member icon


Reputation: 10732
  • View blog
  • Posts: 18,362
  • Joined: 19-March 11

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 22 May 2014 - 06:33 PM

Yes, we're already using webgrind. The problem is that webgrind looks at one run at a time - it analyzes one page load. This is great, much better than nothing, but I want something more powerful.

I've been playing with qcachegrind, aka kcachegrind, which is a little like webgrind except it lives on your local machine and has pretty nice visualisations of the dependencies. But still, this is a one-at-a-time deal. I want some dimensionality.
Was This Post Helpful? 0
  • +
  • -

#6 e_i_pi  Icon User is offline

  • = -1
  • member icon

Reputation: 879
  • View blog
  • Posts: 1,893
  • Joined: 30-January 09

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 22 May 2014 - 10:37 PM

Woops, sorry, I should have read the OP closer :P

How about XHProf? Here's a good article that discusses it, with various screenshots of the GUI.
Was This Post Helpful? 0
  • +
  • -

#7 Atli  Icon User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4238
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 23 May 2014 - 07:07 PM

Someone I worked with recently suggested New Relic to monitory our PHP servers. Haven't tried it out yet, but it's supposedly able to do everything you are asking for, and more.
Was This Post Helpful? 0
  • +
  • -

#8 jon.kiparsky  Icon User is online

  • Chinga la migra
  • member icon


Reputation: 10732
  • View blog
  • Posts: 18,362
  • Joined: 19-March 11

Re: Profiling - good tools/tricks for analyzing xdebug logs in bulk?

Posted 23 May 2014 - 11:42 PM

Hm. I was thinking more of analyzing the data that we're already collecting via xdebug, but I'll look into this. I'm not sure if there's any interest in installing more profiling on the dev server - we're already pushing that one pretty hard, I don't want to knock it over.

Also, I want their website shot. If I wanted to look at pictures of happy people, I'd do a google image search, and if I wanted an endless scroll, I'd start a D&D game.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1