Re: [PHP-DEV] Line profiler for PHP

2014-12-27 Thread Crocodile
Hello Jacob Take a look at http://pinba.org/ . While this is probably not exactly (or may be even not at all) the thing you asked for, it is definitely interesting. It allows for some profiling *right on production. *There are certain things that you only experience under heavy load, and this tool

Re: [PHP-DEV] Line profiler for PHP

2014-12-24 Thread Derick Rethans
On Tue, 23 Dec 2014, Stanislav Malyshev wrote: > > The questions I have are: - Is this even possible? > > Yes, should be possible but: > 1. If you want precision, it would slow down your code a lot, as > basically you need to record timing of each opcode, which can be very > expensive. > 2. If yo

Re: [PHP-DEV] Line profiler for PHP

2014-12-23 Thread Stanislav Malyshev
Hi! > By this I mean I have looked at implementing it a couple of different ways > and each time I get caught up on timing code that spans multiple lines such > as: > > $array = array( > 'my_key' => 'my_value', > ); I would ignore that if I were you and use whatever lines the engine assigns

Re: [PHP-DEV] Line profiler for PHP

2014-12-23 Thread Jacob Bednarz
> > 1. If you want precision, it would slow down your code a lot, as > basically you need to record timing of each opcode, which can be very > expensive. I'm not too concerned about the cost as this would only be running locally and the for the purpose of profiling. The proviso with this would be

Re: [PHP-DEV] Line profiler for PHP

2014-12-23 Thread Nikita Popov
On Tue, Dec 23, 2014 at 10:28 PM, Jacob Bednarz wrote: > Hey, > I have been working on some profiling of an application recently and > whilst xhprof and xdebug are good to get an overall picture to further > break into, I haven’t been able to find a tool for line by line profiling > in PHP for a

Re: [PHP-DEV] Line profiler for PHP

2014-12-23 Thread Stanislav Malyshev
Hi! > The questions I have are: - Is this even possible? Yes, should be possible but: 1. If you want precision, it would slow down your code a lot, as basically you need to record timing of each opcode, which can be very expensive. 2. If you're ok with less precision, you can do sampling, but in

[PHP-DEV] Line profiler for PHP

2014-12-23 Thread Jacob Bednarz
Hey, I have been working on some profiling of an application recently and whilst xhprof and xdebug are good to get an overall picture to further break into, I haven’t been able to find a tool for line by line profiling in PHP for a particular file. I have done a bit of research and found rblinep