Skip to content

Commit 95e8fca

Browse files
authored
Changed stopwatch category from default to "httplug" (#403)
1 parent 6c8178f commit 95e8fca

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release.
44

5+
# 1.23.2 - unreleased
6+
- Changed stopwatch category from default to "httplug", so it's more prominent on Execution timeline view
7+
58
# 1.23.1 - 2021-10-13
69
- Fix issue with whitespaces in URL when URL in tab was copied
710
- Fixed dark mode compatiblity, making some previously invisible elements visible

src/Collector/ProfileClient.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ class ProfileClient implements HttpClient, HttpAsyncClient
5252
*/
5353
private $eventNames = [];
5454

55+
private const STOPWATCH_CATEGORY = 'httplug';
56+
5557
/**
5658
* @param HttpClient|HttpAsyncClient $client The client to profile. Client must implement HttpClient or
5759
* HttpAsyncClient interface.
@@ -85,7 +87,7 @@ public function sendAsyncRequest(RequestInterface $request)
8587
}
8688

8789
$this->collectRequestInformations($request, $stack);
88-
$event = $this->stopwatch->start($this->getStopwatchEventName($request));
90+
$event = $this->stopwatch->start($this->getStopwatchEventName($request), self::STOPWATCH_CATEGORY);
8991

9092
$onFulfilled = function (ResponseInterface $response) use ($event, $stack) {
9193
$this->collectResponseInformations($response, $event, $stack);
@@ -128,7 +130,7 @@ protected function doSendRequest(RequestInterface $request)
128130
}
129131

130132
$this->collectRequestInformations($request, $stack);
131-
$event = $this->stopwatch->start($this->getStopwatchEventName($request));
133+
$event = $this->stopwatch->start($this->getStopwatchEventName($request), self::STOPWATCH_CATEGORY);
132134

133135
try {
134136
$response = $this->client->sendRequest($request);

0 commit comments

Comments
 (0)