mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Add support for CURLINFO_QUEUE_TIME_T in curl_getinfo() (#19147)
This patch adds support for the CURLINFO_QUEUE_TIME_T constant in the curl_getinfo() function when compiled with libcurl >= 8.6.0. CURLINFO_QUEUE_TIME_T This constant allows retrieving the time (in microseconds) that the request spent in libcurl’s connection queue before it was sent.
This commit is contained in:
parent
0e80be83b3
commit
7fb6afbe9f
5 changed files with 63 additions and 1 deletions
|
@ -2571,6 +2571,11 @@ PHP_FUNCTION(curl_getinfo)
|
|||
if (curl_easy_getinfo(ch->cp, CURLINFO_APPCONNECT_TIME_T, &co) == CURLE_OK) {
|
||||
CAAL("appconnect_time_us", co);
|
||||
}
|
||||
#if LIBCURL_VERSION_NUM >= 0x080600 /* Available since 8.6.0 */
|
||||
if (curl_easy_getinfo(ch->cp, CURLINFO_QUEUE_TIME_T , &co) == CURLE_OK) {
|
||||
CAAL("queue_time_us", co);
|
||||
}
|
||||
#endif
|
||||
if (curl_easy_getinfo(ch->cp, CURLINFO_CONNECT_TIME_T, &co) == CURLE_OK) {
|
||||
CAAL("connect_time_us", co);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue