[CmdPal][Performance Monitor] Add disk activity monitoring#48844
[CmdPal][Performance Monitor] Add disk activity monitoring#48844JRScott812 wants to merge 13 commits into
Conversation
|
@microsoft-github-policy-service agree |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I realized that there is an error in the file read/write dock widget, where the performance graph, when you click on the widget, won't display. |
|
I fixed the template error and consolidated duplicated code |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@JRScott812, could we get a screen recording showing this in action? |
|
Here is a video I recorded in a fresh Windows Sandbox session: Screen.Recording.2026-07-07.134144.-.Trim.mp4Since Windows Sandbox is so barebones and is missing many dependencies, it kept breaking when I clicked on the widgets to see the graphs. So here is a video I recorded on my PC: Screen.Recording.2026-07-07.134730.mp4 |
There was a problem hiding this comment.
Pull request overview
Adds disk activity monitoring to the CmdPal Performance Monitor extension, enabling a new Disk widget (including dock/band support) that shows active time plus read/write transfer rates, with configurable display units.
Changes:
- Introduces a Disk metric/widget page (plus commands to cycle disks) and wires it into the main list and dock bands.
- Adds disk performance data collection via new
DiskStats(PerfCounters) and a new chart type/color for disk graphs. - Adds disk speed unit settings and localizable strings/templates for the new UI.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/Strings/en-US/Resources.resw | Adds localized strings for Disk widget UI, commands, subtitles, and disk speed unit setting text. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/SpeedUnit.cs | Renames/repurposes the speed unit enum for reuse beyond network. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/SettingsManager.cs | Adds a Disk speed-unit choice setting alongside the existing Network speed unit. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/PerformanceWidgetsPage.cs | Integrates Disk into the widgets list/bands and adds SystemDiskUsageWidgetPage plus shared formatting helpers. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/PerformanceMonitorCommandsProvider.cs | Registers a new Disk dock band command/page and disposes it appropriately. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/Microsoft.CmdPal.Ext.PerformanceMonitor.csproj | Ensures the new Disk adaptive card template is copied to output. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/Icons.cs | Adds read/write icons for disk transfer bands. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Templates/SystemDiskUsageTemplate.json | Adds the adaptive card template for the Disk widget. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Helpers/SystemData.cs | Adds lazy initialization for DiskStats. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Helpers/DiskStats.cs | Implements disk PerfCounter collection, per-disk usage/read/write data, and chart values. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Helpers/DataType.cs | Adds DataType.Disk for the update loop. |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Helpers/DataManager.cs | Adds Disk update handling and exposes GetDiskStats(). |
| src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/DevHome/Helpers/ChartHelper.cs | Adds a disk chart type and styling. |
Comments suppressed due to low confidence (1)
src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/SpeedUnit.cs:9
- The enum summary still says it controls network transmission speed, but
SpeedUnitis now used for both network and disk settings. Update the XML doc so it matches current usage.
from Copilot Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Refactored the creation of `_diskReadItem` and `_diskWriteItem` in `CreateDiskBandItems` to use object initializers for setting `Subtitle`, `Icon`, and `MoreCommands`. This improves code clarity and style without changing behavior.
Summary of the Pull Request
PR Checklist
Detailed Description of the Pull Request / Additional comments
Added the ability to see the Disk Stats in the Performance Monitor of Command Palette. It is also able to be pinned to the dock. It functions similarly to the Network Stats, in that you can cycle between different disks and can see the read & write speed.
Validation Steps Performed
Ran the dev version of Command Palette and cycled through my devices disk and compared them with Task Manager. Turned on the Dock and compared the values with Task Manager as well on all my disks.