1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Update Composer dependencies.

This commit is contained in:
Caleb Mazalevskis 2023-02-15 23:36:22 +08:00
parent 12049cba3a
commit 47fbfd2bca
No known key found for this signature in database
GPG key ID: 082E6BC1046FAB95
12558 changed files with 155183 additions and 28099 deletions

View file

@ -38,24 +38,29 @@ final class HttpClientDataCollector extends DataCollector implements LateDataCol
*/
public function collect(Request $request, Response $response, \Throwable $exception = null)
{
$this->reset();
foreach ($this->clients as $name => $client) {
[$errorCount, $traces] = $this->collectOnClient($client);
$this->data['clients'][$name] = [
'traces' => $traces,
'error_count' => $errorCount,
];
$this->data['request_count'] += \count($traces);
$this->data['error_count'] += $errorCount;
}
$this->lateCollect();
}
public function lateCollect()
{
foreach ($this->clients as $client) {
$this->data['request_count'] = 0;
$this->data['error_count'] = 0;
$this->data += ['clients' => []];
foreach ($this->clients as $name => $client) {
[$errorCount, $traces] = $this->collectOnClient($client);
$this->data['clients'] += [
$name => [
'traces' => [],
'error_count' => 0,
],
];
$this->data['clients'][$name]['traces'] = array_merge($this->data['clients'][$name]['traces'], $traces);
$this->data['request_count'] += \count($traces);
$this->data['error_count'] += $this->data['clients'][$name]['error_count'] += $errorCount;
$client->reset();
}
}