Skip to content

Commit 95c27c5

Browse files
authored
Add "View WebSocket messages" in "Perf features reference" (#3632)
* todo * comment notes * prep incoming section phase2 * real section content * intro * not upstream * below>above 🤦‍♂️ * un-todo
1 parent 51446f9 commit 95c27c5

File tree

7 files changed

+112
-20
lines changed

7 files changed

+112
-20
lines changed
534 Bytes
Loading
117 KB
Loading
-251 KB
Loading
502 Bytes
Loading
65.9 KB
Loading

microsoft-edge/devtools/performance/reference.md

Lines changed: 111 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: msedgedevrel
66
ms.topic: article
77
ms.service: microsoft-edge
88
ms.subservice: devtools
9-
ms.date: 02/24/2025
9+
ms.date: 11/26/2025
1010
---
1111
<!-- Copyright Kayce Basques
1212
@@ -31,8 +31,8 @@ For a step-by-step tutorial on how to analyze the performance of a page using th
3131
The images in this page show DevTools undocked into its own, dedicated window. To learn more about undocking DevTools, see [Undock DevTools into a separate window](../customize/placement.md#undock-devtools-into-a-separate-window) in _Change DevTools placement (Undock, Dock to bottom, Dock to left)_.
3232

3333

34-
<!-- generated by tocex on 2025/02/21 -->
3534
**Detailed contents:**
35+
<!-- https://github.com/captainbrosset/WebToc 2025/02/21-->
3636
* [Open the Performance tool](#open-the-performance-tool)
3737
* [Record performance](#record-performance)
3838
* [Record runtime performance](#record-runtime-performance)
@@ -85,6 +85,7 @@ The images in this page show DevTools undocked into its own, dedicated window. T
8585
* [View paint profiler](#view-paint-profiler)
8686
* [View CSS selector statistics](#view-css-selector-statistics)
8787
* [View messages between windows, iframes, and dedicated workers](#view-messages-between-windows-iframes-and-dedicated-workers)
88+
* [View WebSocket messages](#view-websocket-messages)
8889
* [Analyze rendering performance with the Rendering tool](#analyze-rendering-performance-with-the-rendering-tool)
8990
* [View frames per second in realtime with the FPS meter](#view-frames-per-second-in-realtime-with-the-fps-meter)
9091
* [View painting events in realtime with Paint Flashing](#view-painting-events-in-realtime-with-paint-flashing)
@@ -102,11 +103,17 @@ The images in this page show DevTools undocked into its own, dedicated window. T
102103
1. Right-click a webpage, select **Inspect**, and then in DevTools, click the **Performance** tab in the **Activity Bar**.
103104
-->
104105

105-
To use the sections in this page, open the **Performance** tool in DevTools:
106+
To open the **Performance** tool in DevTools:
106107

107-
1. To open DevTools, right-click the webpage, and then select **Inspect**. Or, press **Ctrl+Shift+I** (Windows, Linux) or **Command+Option+I** (macOS). DevTools opens.
108+
1. Right-click a webpage, and then select **Inspect**.
108109

109-
1. In DevTools, on the **Activity Bar**, select the **Performance** tab. If that tab isn't visible, click the **More tools** (![More tools icon](./reference-images/more-tools-icon.png)) button.
110+
Or, press **Ctrl+Shift+I** (Windows, Linux) or **Command+Option+I** (macOS).
111+
112+
DevTools opens.
113+
114+
1. In DevTools, on the **Activity Bar**, select the **Performance** (![Performance icon](./reference-images/performance-icon.png)) tab.
115+
116+
If that tab isn't visible, click the **More tools** (![More tools icon](./reference-images/more-tools-icon.png)) button.
110117

111118

112119
<!-- ====================================================================== -->
@@ -122,7 +129,11 @@ To analyze the performance of a webpage while it's running (rather than while it
122129

123130
1. Go to the webpage that you want to analyze, such as the [Photo Gallery demo](https://microsoftedge.github.io/Demos/photo-gallery/).
124131

125-
1. In DevTools, open the **Performance** tool.
132+
1. Right-click the webpage, and then select **Inspect**.
133+
134+
DevTools opens.
135+
136+
1. On the **Activity Bar**, select the **Performance** (![Performance icon](./reference-images/performance-icon.png)) tool.
126137

127138
1. Click the **Record** (![Record icon](./reference-images/record-icon.png)) button.
128139

@@ -142,15 +153,19 @@ To analyze the performance of a webpage while it's loading (rather than while it
142153

143154
1. Go to the webpage that you want to analyze, such as the [Photo Gallery demo](https://microsoftedge.github.io/Demos/photo-gallery/).
144155

145-
1. In DevTools, open the **Performance** tool.
156+
1. Right-click the webpage, and then select **Inspect**.
157+
158+
DevTools opens.
159+
160+
1. On the **Activity Bar**, select the **Performance** (![Performance icon](./reference-images/performance-icon.png)) tool.
146161

147162
1. Click the **Refresh page** (![Refresh Page](./reference-images/refresh-page-icon.png)) button:
148163

149164
![Refresh page](./reference-images/refresh-button.png)
150165

151166
DevTools records performance metrics while the page refreshes and then automatically stops the recording a couple seconds after the load finishes. Then, DevTools displays the recording and automatically zooms in on the portion of the recording where most of the activity occurred:
152167

153-
![A page-load recording](./reference-images/refreshed.png)<!-- 1st instance of this png ~~ -->
168+
![A page-load recording](./reference-images/refreshed.png)<!-- 1st instance of this png -->
154169

155170

156171
<!-- ------------------------------ -->
@@ -174,9 +189,13 @@ To force garbage collection while you are recording a page, click the **Collect
174189
<!-- ------------------------------ -->
175190
#### Show recording settings
176191

177-
To expose more settings related to how DevTools captures performance recordings, in the **Performance** tool, click the **Capture settings** (![Capture settings](./reference-images/capture-settings-icon.png)) button. Checkboxes and dropdown lists are displayed at the top of the **Performance** tool:
192+
To expose more settings related to how DevTools captures performance recordings:
178193

179-
![The Capture Settings section at top of the Performance tool](./reference-images/capture-settings.png)
194+
* In the **Performance** tool, click the **Capture settings** (![Capture settings](./reference-images/capture-settings-icon.png)) button.
195+
196+
Checkboxes and dropdown lists are displayed at the top of the **Performance** tool:
197+
198+
![The Capture Settings section at top of the Performance tool](./reference-images/capture-settings.png)
180199

181200

182201
<!-- ------------------------------ -->
@@ -387,27 +406,34 @@ To closely inspect your performance recording, you can select a portion of a rec
387406
<!-- ---------- -->
388407
###### Use keyboard shortcuts to navigate
389408

390-
To use keyboard shortcuts to quickly navigate the recording, first, choose your preferred style of keyboard navigation.
409+
To use keyboard shortcuts to quickly navigate the recording, first, choose your preferred style of keyboard navigation, as follows:
410+
411+
* In the top-right corner of the **Performance** tool, click the **Show shortcuts** (![The Show shortcuts icon](./reference-images/show-shortcuts-icon.png)) button, and then select the **Modern** or **Classic** option button.
391412

392-
In the top-right corner of the **Performance** tool, click the **Show shortcuts** (![The Show shortcuts icon](./reference-images/show-shortcuts-icon.png)) button, and then select the **Modern** or **Classic** option button. The **Keyboard shortcuts** dialog displays the available shortcuts for the selected mapping option.
413+
The **Keyboard shortcuts** dialog displays the available shortcuts for the selected mapping option.
393414

394-
With the **Modern** option button selected:
415+
416+
When the **Modern** option button is selected:
395417

396418
![Keyboard shortcuts popup with Modern selected](./reference-images/perf-shortcuts-style.png)
397419

398420
* To zoom: **Command/Ctrl** + mouse wheel.
399-
* To vertical scroll: Mouse wheel.
421+
* To vertical scroll<!-- todo: pan = scroll? -->: Mouse wheel.
400422
* To horizontal scroll: **Shift** + mouse wheel.
401423

402424

403-
With the **Classic** option button selected:
425+
When the **Classic** option button is selected:
404426

405427
* To zoom: Mouse wheel, or touchpad up or down.
406428
* To vertical scroll: **Shift** + mouse wheel.
407429
* To horizontal scroll: **Shift** + **Left arrow**|**Right arrow**
408430

409431

410-
You can also pan left and right by pressing the **A** and **D** keys, and zoom by pressing the **W** or **S** keys.
432+
Additional shortcuts:
433+
434+
* Zoom, by pressing **W** or **S**.
435+
436+
* Pan<!-- todo: pan = scroll? --> left and right, by pressing **A** or **D**.
411437

412438

413439
<!-- ---------- -->
@@ -572,7 +598,7 @@ Select an event to view more information about it in the **Summary** tab. DevTo
572598

573599
![More information about the anonymous function in the Summary tab](./reference-images/summary-me.png)
574600

575-
DevTools represents main thread activity with a flame chart:
601+
DevTools represents main thread activity with a flame chart:
576602

577603
![A flame chart](./reference-images/main-flame-chart.png)
578604

@@ -1074,6 +1100,63 @@ See also:
10741100
* [postMessage Trace Events demo (source code)](https://github.com/MicrosoftEdge/Demos/tree/main/devtools-postmessage-perf-timeline)
10751101

10761102

1103+
<!-- ------------------------------ -->
1104+
#### View WebSocket messages
1105+
<!-- not upstream -->
1106+
1107+
WebSocket activities are displayed in the **Network** track in the **Performance** tool, to help correlate JavaScript activity with WebSocket messages. This can help identify whether latency issues are coming from the client's parsing of a message, or from the server's response.
1108+
1109+
To view WebSocket messages in the **Performance** tool:
1110+
1111+
1. Go to a webpage that sends WebSocket messages, such as [Simple chat app](https://azure.github.io/azure-webpubsub/demos/chat), in a new window or tab.
1112+
1113+
1. Right-click the webpage, and then select **Inspect**.
1114+
1115+
DevTools opens.
1116+
1117+
1. In the **Activity Bar**, select the **Performance** (![Performance icon](./reference-images/performance-icon.png)) tool.
1118+
1119+
1. In the upper left of the **Performance** tool, click the **Record** (![Record icon](./reference-images/record-icon.png)) button.
1120+
1121+
1. In the chat webpage, in the **User Name** text box, enter a name, such as "John", and then click the **Connect** button.
1122+
1123+
At the bottom of the chat form, a message is displayed, such as "John:v8g... connected."
1124+
1125+
1. In the **Send a message** text box, enter a message, such as "Hello", and then click the **Send** button.
1126+
1127+
In the chat app, the message is displayed, such as "Hello":
1128+
1129+
![WebSocket messages in the Performance tool](./reference-images/websocket-messages.png)
1130+
1131+
WebSocket traffic is generated.
1132+
1133+
1. In the upper left of the **Performance** tool, click the **Stop** (![Stop icon](./reference-images/stop-icon.png)) button.
1134+
1135+
Or, in the middle of the **Performance** tool, click the **Stop** button.
1136+
1137+
In the **Performance** tool, the timeline is displayed.
1138+
1139+
1. Expand the **Network** track.
1140+
1141+
1. Click a vertical gold line.
1142+
1143+
1. At the bottom of the **Performance** tool, in the **Summary** tab, information about the selected WebSocket message is displayed, such as:
1144+
1145+
* **Send WebSocket handshake**
1146+
* **Receive WebSocket handshake**
1147+
* **Receive WebSocket message**:
1148+
1149+
![Receive WebSocket message](./reference-images/receive-websocket-message.png)
1150+
1151+
See also:
1152+
* [Analyze the messages of a WebSocket connection](../network/reference.md#analyze-the-messages-of-a-websocket-connection) in _Network features reference_.
1153+
* [Track event initiators](#track-event-initiators), above.
1154+
* [Analyze runtime performance (tutorial)](./index.md)
1155+
<!--
1156+
* [View WebSocket message activities in the Performance tool](../whats-new/2024/08/devtools-128.md#view-websocket-message-activities-in-the-performance-tool) in _What's New in DevTools (Microsoft Edge 128)_.
1157+
-->
1158+
1159+
10771160
<!-- ====================================================================== -->
10781161
## Analyze rendering performance with the Rendering tool
10791162
<!-- https://developer.chrome.com/docs/devtools/performance/reference#rendering -->
@@ -1082,11 +1165,19 @@ Use the **Rendering** tool to help visualize the rendering performance of your p
10821165

10831166
To open the **Rendering** tool:
10841167

1085-
1. Right-click a webpage, and then select **Inspect**. Or, press **Ctrl+Shift+I** (Windows, Linux) or **Command+Option+I** (macOS). DevTools opens.
1168+
1. Open a webpage, such as [Sluggish Animation](https://microsoftedge.github.io/Demos/devtools-performance-get-started/), in a new window or tab.
1169+
1170+
1. Right-click the webpage, and then select **Inspect**.
1171+
1172+
DevTools opens.
1173+
1174+
1. If the **Quick View** panel isn't shown, select **Customize and control DevTools** (![The Customize and control DevTools icon](./reference-images/customize-and-control-devtools-icon.png)) > **Toggle Quick View panel**.
1175+
1176+
Or, press **Esc**.
10861177

1087-
1. On the **Activity Bar** (or **Quick View**), click the **More tools** (![More tools icon](./reference-images/more-tools-icon.png)) button, and then select **Rendering**.
1178+
1. On the **Quick View** toolbar, click the **More tools** (![More tools icon](./reference-images/more-tools-icon.png)) button, and then select **Rendering**.
10881179

1089-
The **Rendering** tool opens:
1180+
The **Rendering** tool opens in the **Quick View** panel:
10901181

10911182
![The Rendering tool](./reference-images/rendering-tool.png)
10921183

microsoft-edge/devtools/whats-new/2024/08/devtools-128.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ See also:
7676
WebSocket activities have been added to the **Network** track in the **Performance** tool, to help correlate JavaScript activity with WebSocket messages. This can help identify whether latency issues are coming from the client's parsing of a message, or from the server's response.
7777

7878
See also:
79+
* [View WebSocket messages](../../../performance/reference.md#view-websocket-messages) in _Performance features reference_.
7980
* [Analyze runtime performance (tutorial)](../../../performance/index.md)
8081

8182

0 commit comments

Comments
 (0)