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?