What is the code to show how long it took for PHP to process a page?
Also, how many sql queries were performed to generate that page?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For the first question.
The second one is a little more complicated. You need an shared gateways that keeps tracks of all your queries and stores an execution counter.
The most simple example can be a wrapper method around the mysql_query that increments a static variable and then passes the query to mysql_query.
The most part of modern ORM implements that feature, if you already use one of them.