Skip to content

core(insights): implement network-dependency-tree insight #16407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 8, 2025

Conversation

adamraine
Copy link
Member

@adamraine adamraine commented Mar 24, 2025

Ref #16323

This introduces a new audit detail type network-tree which will eventually replace the criticalrequestchain. They use most of the same rendering code on the report side, but there are some key differences that made a separate detail type compelling: #16407 (comment)

Screenshot 2025-03-28 at 2 39 22 PM

};

interface NetworkTree extends BaseDetails {
type: 'network-tree';
Copy link
Member Author

@adamraine adamraine Mar 28, 2025

Choose a reason for hiding this comment

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

This new detail type is introduced to address the differences in how the network tree is displayed in RPP vs the old CRC audit:

  • The CRC audit will show individual request durations but the new NDT insight will show the entire chain duration
  • The CRC audit will only show any timing/transfer size info for leaf node requests, but the NDT insight will show this info for all requests
  • The CRC audit contains extra request timing info like responseReceivedTime but we don't need this for the NDT insight. The NDT insight has enough information to fill in this extra data, but I don't want to add extra calculations just to fill in the CRC detail type.

See report/renderer/crc-details-renderer.js for more info on how these detail types are handled.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The CRC audit contains extra request timing info like responseReceivedTime but we don't need this for the NDT insight. The NDT insight has enough information to fill in this extra data, but I don't want to add extra calculations just to fill in the CRC detail type.

can we stuff that info into a title tooltip?

@@ -139,26 +137,24 @@ class CriticalRequestChainRenderer {
/**
* Recursively builds a tree from segments.
* @param {DOM} dom
* @param {DocumentFragment} tmpl
Copy link
Member Author

Choose a reason for hiding this comment

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

tmpl and details are never actually used anywhere, they just get passed through the recursive calls.

* @property {boolean} isLastChild
* @property {boolean} hasChildren
* @property {number} startTime
* @property {number} transferSize
Copy link
Member Author

@adamraine adamraine Mar 28, 2025

Choose a reason for hiding this comment

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

startTime and transferSize are never actually used anywhere. Instead, createChainNode will just look at the data in node.

@adamraine adamraine changed the title WIP(insights): implement network-dependency-tree insight core(insights): implement network-dependency-tree insight Mar 28, 2025
@adamraine adamraine marked this pull request as ready for review March 28, 2025 21:59
@adamraine adamraine requested a review from a team as a code owner March 28, 2025 21:59
@adamraine adamraine requested review from connorjclark and removed request for a team March 28, 2025 21:59
@connorjclark
Copy link
Collaborator

could we un-bold the byte portion of each row? it's the timing that is more important

@connorjclark
Copy link
Collaborator

in the insight card we highlight (subtly...) the actual critical path:

image

and if you hover (this works for any node):

image

note how the "max latency" label color matches each part of the longest critical path.

can we do the same in LH?

@adamraine
Copy link
Member Author

Yeah, it was a pretty simple change:
Screenshot 2025-04-04 at 4 00 54 PM

@connorjclark connorjclark merged commit ec7f2bc into main Apr 8, 2025
26 of 27 checks passed
@connorjclark connorjclark deleted the network-dep-tree-insight branch April 8, 2025 22:23
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.

3 participants