From b6caa9522d5d16f7706f212f8cb983a0d8118aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Ostroluck=C3=BD?= Date: Thu, 14 Oct 2021 23:51:12 +0200 Subject: [PATCH] Changed stopwatch category from default to "httplug" --- CHANGELOG.md | 3 +++ src/Collector/ProfileClient.php | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dff28c2d..f1140af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +# 1.23.2 - unreleased +- Changed stopwatch category from default to "httplug", so it's more prominent on Execution timeline view + # 1.23.1 - 2021-10-13 - Fix issue with whitespaces in URL when URL in tab was copied - Fixed dark mode compatiblity, making some previously invisible elements visible diff --git a/src/Collector/ProfileClient.php b/src/Collector/ProfileClient.php index 743da4f3..9ab24cfb 100644 --- a/src/Collector/ProfileClient.php +++ b/src/Collector/ProfileClient.php @@ -52,6 +52,8 @@ class ProfileClient implements HttpClient, HttpAsyncClient */ private $eventNames = []; + private const STOPWATCH_CATEGORY = 'httplug'; + /** * @param HttpClient|HttpAsyncClient $client The client to profile. Client must implement HttpClient or * HttpAsyncClient interface. @@ -85,7 +87,7 @@ public function sendAsyncRequest(RequestInterface $request) } $this->collectRequestInformations($request, $stack); - $event = $this->stopwatch->start($this->getStopwatchEventName($request)); + $event = $this->stopwatch->start($this->getStopwatchEventName($request), self::STOPWATCH_CATEGORY); $onFulfilled = function (ResponseInterface $response) use ($event, $stack) { $this->collectResponseInformations($response, $event, $stack); @@ -128,7 +130,7 @@ protected function doSendRequest(RequestInterface $request) } $this->collectRequestInformations($request, $stack); - $event = $this->stopwatch->start($this->getStopwatchEventName($request)); + $event = $this->stopwatch->start($this->getStopwatchEventName($request), self::STOPWATCH_CATEGORY); try { $response = $this->client->sendRequest($request);