Profiling PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Sleeman

    Profiling PHP

    Hi all,

    I'm trying to find a performance problem I've got in a reasonably large
    system I'm writing. Anyway, I've had a look around at the offerings for
    profiling php requests...

    xdebug : seems to make my requests just hit the 30 sec timeout all the time.
    apd : segfaults every time I make a request
    dbg : no front-end for linux (I looked a phpEd but it seemed to suck, and I
    couldn't see how to get profiling info out of it) ?
    php-profiler : has to be applied as a patch to php source, I don't want to
    compile my own sources (box is debian-unstable, I'd rather keep everything
    as standard as possible than screw things up locally installing major
    things like PHP).

    Are there any other solutions for profiling the execution of a php request
    that I've missed or is this it and am I gonna have to start picking stuff
    apart in my code to try and isolate the problem ?!

    ---
    Cheers.
  • Louis-Philippe Huberdeau

    #2
    Re: Profiling PHP

    Probably one of those zend products. I saw the debugger in action and it
    seemed to work quite well.

    As for the 30 sec problem, have you tried set_time_limit( 0)?

    James Sleeman wrote:[color=blue]
    > Hi all,
    >
    > I'm trying to find a performance problem I've got in a reasonably large
    > system I'm writing. Anyway, I've had a look around at the offerings for
    > profiling php requests...
    >
    > xdebug : seems to make my requests just hit the 30 sec timeout all the time.
    > apd : segfaults every time I make a request
    > dbg : no front-end for linux (I looked a phpEd but it seemed to suck, and I
    > couldn't see how to get profiling info out of it) ?
    > php-profiler : has to be applied as a patch to php source, I don't want to
    > compile my own sources (box is debian-unstable, I'd rather keep everything
    > as standard as possible than screw things up locally installing major
    > things like PHP).
    >
    > Are there any other solutions for profiling the execution of a php request
    > that I've missed or is this it and am I gonna have to start picking stuff
    > apart in my code to try and isolate the problem ?!
    >
    > ---
    > Cheers.[/color]

    Comment

    • JVlad

      #3
      Re: Profiling PHP

      One time I installed phped/Linux and it worked under Redhat 7.2, never
      tried since that. I'm working under Windows and phped works better
      under this platform. Profiler is really incredible, time resolution is
      about some microseconds, sufficiently good for all of us.
      BTW, dbg is the first and seems the only good profiler for php :))

      JV.

      [color=blue]
      > xdebug : seems to make my requests just hit the 30 sec timeout all the time.
      > apd : segfaults every time I make a request
      > dbg : no front-end for linux (I looked a phpEd but it seemed to suck, and I
      > couldn't see how to get profiling info out of it) ?
      > php-profiler : has to be applied as a patch to php source, I don't want to
      > compile my own sources (box is debian-unstable, I'd rather keep everything
      > as standard as possible than screw things up locally installing major
      > things like PHP).
      >
      > Are there any other solutions for profiling the execution of a php request
      > that I've missed or is this it and am I gonna have to start picking stuff
      > apart in my code to try and isolate the problem ?!
      >
      > ---
      > Cheers.[/color]

      Comment

      Working...