5
Ich versuche, die Anfragen an einen API-Server von einem PHP-Client mit Guzzle (v 6) zu profilieren. In der Guzzle 5.3 gibt es diese complete
und before
Ereignisbehandlung.Wie profile ich Guzzle 6 Anfragen?
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();
}
}
Aber wie mache ich das in v6?