0

We are trying to understand total time taken for an api to respond. Currently we are calculating that using a timer. We could't find any header in http response object helpful for this. Meanwhile curl is able to provide the informations like time_namelookup, time_connect, time_appconnect, time_pretransfer, time_redirect, time_redirect, time_starttransfer and time_total.

Is there a way to understand these in javascript/php?

vcode
  • 453
  • 4
  • 8

1 Answers1

0

Can you check this How to measure time taken by a function to execute you can try calling your api inside that function?

Akhil Suresh
  • 151
  • 9