Skip to content
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

Fix time calculation in Trace Graph view #1920

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxgaponov
Copy link
Contributor

@maxgaponov maxgaponov commented Oct 30, 2023

Which problem is this PR solving?

Description of the changes

  • Now the total duration is calculating as the duration of the union of spans.

How was this change tested?

  • Modified existing tests

Checklist

Resolves jaegertracing#1918
Now the total duration is calculating as
the duration of the union of spans.

Signed-off-by: Maksim Gaponov <gaponovmaxev@gmail.com>
@maxgaponov maxgaponov requested a review from a team as a code owner October 30, 2023 18:14
@maxgaponov maxgaponov requested review from joe-elliott and removed request for a team October 30, 2023 18:14
mdr.add(m.span.startTime, m.span.startTime + (m.span.duration <= 0 ? 0 : m.span.duration - 1)),
new DRange()
).length;
const totalTime = node.members.reduce((p, m) => p + m.span.duration, 0);
Copy link
Member

Choose a reason for hiding this comment

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

@GLVSKiriti this sounds similar to the other fix you made in another view. Is there a way to consolidate these calculations?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know exactly but I will take a look on this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we push it? The change is relatively small but fixes self-time and total time calculation bugs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

[Bug]: Duration of overlapping operations is calculating incorrectly in TraceGraph view
3 participants