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:
Emre Çalışkan 2025-07-17 15:56:07 +03:00 committed by GitHub
parent 0e80be83b3
commit 7fb6afbe9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 63 additions and 1 deletions

View file

@ -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);
}