是否可以使用curl_multi记录每个进程的响应时间?这是我当前使用的代码,我只是不确定如何记录每个进程的响应时间。谢谢你的帮助!
do
{
$execReturnValue = curl_multi_exec($mh, $runningHandles);
} while ($execReturnValue == CURLM_CALL_MULTI_PERFORM);
// Loop and continue processing the request
while ($runningHandles && $execReturnValue == CURLM_OK)
{
// Wait forever for network
$numberReady = curl_multi_select($mh);
if ($numberReady != -1)
{
// Pull in any new data, or at least handle timeouts
do
{
$execReturnValue = curl_multi_exec($mh, $runningHandles);
} while ($execReturnValue == CURLM_CALL_MULTI_PERFORM);
}
}
//End Run
//Get Data and Close
foreach($ping as $cid=>$p)
{
$curlError = curl_error($c[$cid]);
if($curlError == "")
{ …
Run Code Online (Sandbox Code Playgroud)