Skip to content

Conversation

maxgaponov
Copy link
Contributor

@maxgaponov maxgaponov commented Nov 13, 2023

Which problem is this PR solving?

Description of the changes

  • Rewrote computeCriticalPath function to make less recursive calls

How was this change tested?

  • Existing tests

Checklist

@maxgaponov maxgaponov requested a review from a team as a code owner November 13, 2023 17:56
@maxgaponov maxgaponov requested review from albertteoh and removed request for a team November 13, 2023 17:56
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

I recommend writing down the algorithm in words, to understand what you're trying to change. So far it does not seem equivalent to me.

criticalPath: criticalPathSection[]
): criticalPathSection[] => {
const currentSpan: Span = spanMap.get(spanId)!;
let criticalPathBoundary = currentSpan.startTime + currentSpan.duration;
Copy link
Member

Choose a reason for hiding this comment

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

confusing name, boundary can be either top or bottom

spanId: currentSpan.spanID,
section_start: childEndTime,
section_end: criticalPathBoundary,
};
Copy link
Member

Choose a reason for hiding this comment

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

I don't follow. criticalPathBoundary is initially end-of-parent. This says if the child ends before than, then the difference between child.end and parent.end is the critical path contributed by that span?

reference => reference.refType === 'CHILD_OF'
)[0].spanID;
computeCriticalPath(spanMap, parentSpanId, criticalPath, currentSpan.startTime);
for (let i = 0; i < currentSpan.childSpanIds.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

is there an assumption on the order of this array?

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time.

@github-actions github-actions bot added the stale label Aug 4, 2025
@yurishkuro yurishkuro removed the stale label Aug 4, 2025
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. You may re-open it if you need more time.

@github-actions github-actions bot added the stale label Oct 6, 2025
@github-actions
Copy link

This pull request has been automatically closed due to inactivity. You may re-open it if you need more time. We really appreciate your contribution and we are sorry that this has not been completed.

@github-actions github-actions bot closed this Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants