5
Próbuję profilować żądania wysłane do serwera API z klienta PHP przy użyciu Guzzle (v 6).Jak profilować żądania Guzzle 6?
W Guzzle 5.3 istnieje obsługa zdarzeń complete
i before
.
class GuzzleProfiler implements SubscriberInterface
{
public function getEvents()
{
return [
'before' => ['onBefore'],
'complete' => ['onComplete']
];
}
public function onBefore(BeforeEvent $event, $name)
{
start_profiling();
}
public function onComplete(CompleteEvent $event, $name)
{
end_profiling();
}
}
Ale jak to zrobić w wersji 6?