Skip to content

Conversation

@mihaibudiu
Copy link
Contributor

Fixes #5333

This PR contains several changes that were originally part of #4632
It contains all changes from the first commit and some changes from the second commit that modify the profiler.
(and a few additional changes)

Copilot AI review requested due to automatic review settings December 24, 2025 19:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the profiler visualization by adding operation information to node displays, improving tooltip scrollability, and streamlining the top nodes API by removing the hardcoded limit parameter.

Key changes:

  • Added operation field to node display in tooltips and top nodes tables
  • Enhanced tooltip styling with sticky headers and scrollbars for better navigation
  • Removed the hardcoded "n=20" parameter from top nodes functions across the codebase

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ProfilerTooltip.svelte Added operation column display and improved scrolling with sticky headers
ProfilerLayout.svelte Added operation field to node data and updated metric selection handling
ProfilerDiagram.svelte Removed node count parameter from showTopNodes and cleaned up minimap styling
profiler.ts Updated showTopNodes and topNodes methods to remove count parameter
profile.ts Added new rebalancing metrics and operation field to NodeAndMetric class
cytograph.ts Modified topNodes to include operation field and removed result limiting
index.ts Updated event listeners to remove hardcoded count parameter
fileLoader.ts Removed count parameter from topNodes and showTopNodes methods
index.html Reformatted button text from "Top 20 nodes" to "Top nodes"

Copy link
Contributor

@Karakatiza666 Karakatiza666 left a comment

Choose a reason for hiding this comment

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

To fix the style issues with the tooltip, copy .profiler-tooltip-container and .profiler-tooltip CSS classes definition verbatim from issue4632

@Karakatiza666
Copy link
Contributor

Other than the change requested LGTM.

In addition to these changes, I would recommend cherry-picking my entire commit from issue4632 to resolve the issues that I mentioned there since one of them is related to #5333, rather than dragging those fixes out into a separate PR.

@Karakatiza666
Copy link
Contributor

Removing the shadow from the minimap makes you lose its borders, so it looks like two abstract boxes rather than a minimap
image

I am in favor of leaving the shadow - it is not as visually cumbersome as a real border, but it still provides a useful silhouette I find useful for the minimap

@mihaibudiu
Copy link
Contributor Author

the shadow does not mean anything - there is no square object to represent.

@mihaibudiu
Copy link
Contributor Author

There was an issue where pinned "top nodes" tooltip would not update when choosing another metric. I fixed it

I don't want this to happen

@ryzhyk
Copy link
Contributor

ryzhyk commented Dec 26, 2025

There was an issue where pinned "top nodes" tooltip would not update when choosing another metric. I fixed it

I don't want this to happen

Why not? This seems like a sensible behavior (to update the list of top nodes to reflect the current selected metric).

@mihaibudiu
Copy link
Contributor Author

You can always click a second time on top nodes if you want that to happen.
you may want nodes colored according to one metric and sorted according to another one

@ryzhyk
Copy link
Contributor

ryzhyk commented Dec 26, 2025

You can always click a second time on top nodes if you want that to happen. you may want nodes colored according to one metric and sorted according to another one

If we want this behavior, the right way to implement it would be to separate the top-N UI into a separate panel with its own controls. But if we have a single control to select a metric, it should be applied consistently to the graph and the top-N list.

@mihaibudiu
Copy link
Contributor Author

what is a panel?
this is how it IS implemented: when you click on the "top nodes" button you get the list for the current metric
this way you get MORE functionality by writing LESS code. I don't see what is wrong with this current behavior.

@ryzhyk
Copy link
Contributor

ryzhyk commented Dec 26, 2025

what is a panel? this is how it IS implemented: when you click on the "top nodes" button you get the list for the current metric this way you get MORE functionality by writing LESS code. I don't see what is wrong with this current behavior.

I believe it's confusing: you allow the user to select a metric, but only apply their selection to some of the widgets.

It's easy for the user to get confused as to what metric the top-N list applies to.

@ryzhyk ryzhyk enabled auto-merge December 28, 2025 17:48
Copy link
Contributor

@Karakatiza666 Karakatiza666 left a comment

Choose a reason for hiding this comment

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

I implemented the requested change myself

@ryzhyk ryzhyk added this pull request to the merge queue Dec 29, 2025
Merged via the queue into main with commit c6e7d48 Dec 29, 2025
1 of 2 checks passed
@ryzhyk ryzhyk deleted the profiler-fixes branch December 29, 2025 10:49
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.

[profiler] The top-20 feature only works for the CPU% metric

4 participants