I would like to time my individual requests. They were timed before as separate curl requests. Now I would like to combine them with curl_multi_exec
and continue to time how long they take. Here is my code:
$mh = curl_multi_init();
curl_multi_add_handle($mh, $ebayRequest);
curl_multi_add_handle($mh, $prosperentRequest);
$running = null;
do {
curl_multi_exec($mh, $running);
curl_multi_select($mh);
} while ($running > 0);
$ebay = curl_multi_getcontent($ebayRequest);
$prosperent = curl_multi_getcontent($prosperentRequest);
//close the handles
curl_multi_remove_handle($mh, $ebayRequest);
curl_multi_remove_handle($mh, $prosperentRequest);
curl_multi_close($mh);
Here is the old code which timed them.
$ebayTime = microtime(true);
// $ebay = $this->ebayExecuteSearch($ebay);
Yii::warning("Ebay time: ".(microtime(true) - $ebayTime));
I thought curl_multi_info_read might help, but it doesn't look useful.