I want to easily find load cause, Is there a way to display resource usage for php scripts like this.

index.php 30%
something.php 10%

index.php 50%
something.php 10%

New Relic is probably the simplest answer.

Xdebug is also useful for profiling code, although it won't necessarily give you performance of one script verses another unless you manually profile each and then compare the traffic each script gets.

Another PHP profiler is XHProf, I haven't used it myself but I think it allows you compare one URL to another.

Finally, you could implement your own instrumentation into your app. Most simply you could record the execution time using microtime() and log this along with the traffic each script gets.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.