Skip to content

Conversation

@mgravell
Copy link
Collaborator

@mgravell mgravell commented Feb 7, 2026

HOTKEYS is a new profiling API in 8.6, allowing a server-side profiling session that shows (unsurprisingly) the "hottest" keys observed during the profiling, separately by CPU and network (which can be enabled/disabled independently).

Usage is discussed in the docs as part of this PR

  • propose API shape
  • implement
  • integration tests
  • document
  • validate "count" usage
  • validate "duration" usage
  • validate slot filter on cluster
  • find out if there's any significance to the additional array level (answer: future-proofing)
  • verify RESP3

Note tests are linked to 8.6; CI bumped to 8.6 GA:

image

On files: I'm trying a new layout here; instead of making a mess throughout huge files, I've focused these changes at the "feature" scope; the API is in HotKeys.cs, with the implementation code in sub-files:

image

IMO this is much more friendly, and if there's no objections, I'll add "get the AI to move things around" to the backlog.

@mgravell mgravell marked this pull request as ready for review February 8, 2026 21:05
/// <param name="flags">The command flags to use.</param>
/// <returns>The data captured during <c>HOTKEYS</c> profiling.</returns>
[Experimental(Experiments.Server_8_6, UrlFormat = Experiments.UrlFormat)]
HotKeysResult? HotKeysGet(CommandFlags flags = CommandFlags.None);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Must we add more synchronous methods? :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is a great question. Historically we've kept them aligned (and we have unit tests that enforce that), but maybe we should start to rethink that. I think that's a bigger discussion than this PR, though.

Maybe step one is a custom Roslyn analyzer to start nudging people in the direction of preferring the async APIs, without using [Obsolete] or [Experimental] hackery.

@mgravell mgravell merged commit a018b87 into main Feb 11, 2026
8 of 9 checks passed
@mgravell mgravell deleted the marc/hotkeys branch February 11, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants