dmitri wrote: |
Quote: | I've been a PHPEd subscriber since... 2004, I think. Before profiling was even added. This is the only thing that continues to make me angry when I need to use it. |
hmm, profiler was added in 2001, when I joined the team. |
I still have my CD copy of PhpEd 3.3 sitting here, released 3/15/2004 (not even the first release I used), and it has no profiler.
dmitri wrote: |
While this is realated to performance measurement, it has nothing to do with profiler. Absolutely.
The main profiler task is to answer the question "how fast your code works" regardless of the context. What you're trying to do is to find an answer to the question like "how fast your database works" depending on the query. At least it's a task for samplers or loggers. |
No, that's absolutely wrong. What I gave was an example. Your "profiler" can not tell me how fast my code works if it can't tell me how fast the function runs when given different inputs. All it gives is a very flawed average. If I'm trying to identify why the code takes 90 seconds to run when it's called with one set of parameters, and 1 second when called with a different set, the PHPEd profiler does absolutely nothing to assist that; It's just going to say that it took an average of 1.89 seconds, with a maximum of 90.
My background before PHP was C and C++. Code profiling is very old-hat in that environment, and any profiler worth its installation footprint will give you a full execution output. It's the *only* way to accurately measure performance because functions can perform
very differently given different inputs.