1

Using CURL/PHP, how can I measure server's execution time? and what is the diference b/w STARTTRANSFER_TIME and PRETRANSFER_TIME ?

3
  • Are you talking about the execution time of the server that runs the CURL code or the other server that's being called by CURL? If it is the other server, I would say that it is not possible to get an execution time - what you can calculate is a response time (which includes network latency) Commented Aug 11, 2011 at 12:26
  • am talking about the server that host the pasge am requestion: by execution time I mean the time that the server puts calculation the result that am requestion! Commented Aug 11, 2011 at 14:36
  • The answer provided by @DaveRandom would give you the time it tool your server to get the response. Try comparing that to the total_time reported back from CURL. Also info about difference in STARTTRANSFER_TIME and PRETRANSFER_TIME Commented Aug 12, 2011 at 0:22

1 Answer 1

1

Regarding STARTTRANSFER_TIME and PRETRANSFER_TIME.

Starttransfer_time

Pass a pointer to a double to receive the time, in seconds, it took from the start until the first byte is just about to be transferred. This includes CURLINFO_PRETRANSFER_TIME and also the time the server needs to calculate the result

Pretransfer_time

Pass a pointer to a double to receive the time, in seconds, it took from the start until the file transfer is just about to begin. This includes all pre-transfer commands and negotiations that are specific to the particular protocol(s) involved

Sign up to request clarification or add additional context in comments.

1 Comment

@ProXamer Please accept the answer if helpful thanks! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.