Skip to content

[CmdPal][Performance Monitor] Add disk activity monitoring#48844

Open
JRScott812 wants to merge 13 commits into
microsoft:mainfrom
JRScott812:main
Open

[CmdPal][Performance Monitor] Add disk activity monitoring#48844
JRScott812 wants to merge 13 commits into
microsoft:mainfrom
JRScott812:main

Conversation

@JRScott812

Copy link
Copy Markdown

Summary of the Pull Request

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
    • (All Cmd Pal tests passed, but there were none specifically for Performance Monitor)
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

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.

@github-actions github-actions Bot added Area-Localization issues regarding to Localization the application Product-Awake Issues regarding the PowerToys Awake utility Product-Command Palette Refers to the Command Palette utility labels Jun 24, 2026
@JRScott812

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@michaeljolley

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@michaeljolley michaeljolley removed the Product-Awake Issues regarding the PowerToys Awake utility label Jun 24, 2026
Comment thread src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.PerformanceMonitor/SettingsManager.cs Outdated
@michaeljolley michaeljolley removed the Area-Localization issues regarding to Localization the application label Jun 24, 2026
@github-actions github-actions Bot added Area-Localization issues regarding to Localization the application Product-Awake Issues regarding the PowerToys Awake utility labels Jun 25, 2026
@niels9001 niels9001 removed Area-Localization issues regarding to Localization the application Product-Awake Issues regarding the PowerToys Awake utility labels Jun 25, 2026
@michaeljolley

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@JRScott812

Copy link
Copy Markdown
Author

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.

@JRScott812

Copy link
Copy Markdown
Author

I fixed the template error and consolidated duplicated code

@JRScott812 JRScott812 requested a review from michaeljolley June 30, 2026 23:07
@michaeljolley

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@michaeljolley

Copy link
Copy Markdown
Contributor

@JRScott812, could we get a screen recording showing this in action?

@JRScott812

Copy link
Copy Markdown
Author

Here is a video I recorded in a fresh Windows Sandbox session:

Screen.Recording.2026-07-07.134144.-.Trim.mp4

Since 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 SpeedUnit is now used for both network and disk settings. Update the XML doc so it matches current usage.

JRScott812 and others added 4 commits July 8, 2026 12:04
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a disk activity to Performance Monitor in Command Palette

4 participants