This commit is contained in:
Sergio Álvarez 2019-11-22 20:40:50 +01:00
parent dc0349d745
commit 11ed179be4
1 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ require_once(dirname(__FILE__) .'/vendor/autoload.php');
// lib.php, helper functions
Lib\plain();
Lib\printf('load');
Lib\printf('https://sergio.am/code/www-tests');
use GuzzleHttp\Client;
use GuzzleHttp\Promise;
@ -25,8 +25,8 @@ $requests = function ($n) use ($client) {
for ($i = 0; $i < $n; $i++) {
yield function() use ($client, $uri, $i) {
Lib\printf(' yield '. $i);
return $client->getAsync($uri . http_build_query(['o' => $i, 's' => random_int(1, 5)]));
Lib\printf(' yield i='. $i);
return $client->getAsync($uri . http_build_query(['i' => $i, 's' => random_int(1, 5)]));
};
}
};