-
Notifications
You must be signed in to change notification settings - Fork 507
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
Speed up Critical path calculation #1975
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Maksim Gaponov <[email protected]>
There was a problem hiding this 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.
): criticalPathSection[] => { | ||
const currentSpan: Span = spanMap.get(spanId)!; | ||
let criticalPathBoundary = currentSpan.startTime + currentSpan.duration; |
There was a problem hiding this comment.
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, | ||
}; |
There was a problem hiding this comment.
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++) { |
There was a problem hiding this comment.
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?
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test