measuring performance in PHP - how?
Posted: Thu Mar 25, 2004 6:49 am
Hello
I would like to test how fast my PHP scripts are executed.
I was thinking of calculating the current time (if millis - if possible) at the beginning of the script (server side) and to send that value into a javascript variable.
When the page loads (onload() event), I calculate again the the current time in javascript and just subtract the latter from the first.
I am hoping that this will give me the time in millis from the moment the page reached the server until the time it was loaded in the client.
Does anyone know of a way to obtain the current time in millis?
Does anyone know of a better way to calculate performance?
thanks
I would like to test how fast my PHP scripts are executed.
I was thinking of calculating the current time (if millis - if possible) at the beginning of the script (server side) and to send that value into a javascript variable.
When the page loads (onload() event), I calculate again the the current time in javascript and just subtract the latter from the first.
I am hoping that this will give me the time in millis from the moment the page reached the server until the time it was loaded in the client.
Does anyone know of a way to obtain the current time in millis?
Does anyone know of a better way to calculate performance?
thanks