Skip to content

Improve performance of Trace Statistics #2721

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 1 commit into from
Apr 19, 2025

Conversation

DamianMaslanka5
Copy link
Contributor

@DamianMaslanka5 DamianMaslanka5 commented Apr 15, 2025

Simplify code and avoid some not needed loops.

These changes improve performance with:

  • large (10k) amount of spans
  • large (1k) amount of unique values in tags

To test:

  1. Run go run cmd/tracegen/main.go -service abcd -traces 1 -spans 10000
  2. Go to Trace Statistics
  3. Group by Operation Name or attr_0

With generated data, after changing selected tag in the group by dropdown, it takes few seconds less to compute the results.

Before

statsBefore

After

statsAfter

Simplify code and avoid some not needed loops.

These changes improve performance with:
* large (10k) amount of spans
* large (1k) amount of unique values in tags

To test:
1. Run `go run cmd/tracegen/main.go -service abcd -traces 1 -spans 10000`
2. Go to Trace Statistics
3. Group by Operation Name or attr_0

With generated data, after changing selected tag in the group by dropdown,
it takes few seconds less to compute the results.

Signed-off-by: Damian Maslanka <[email protected]>
@DamianMaslanka5 DamianMaslanka5 requested a review from a team as a code owner April 15, 2025 17:29
@DamianMaslanka5 DamianMaslanka5 requested review from mahadzaryab1 and removed request for a team April 15, 2025 17:29
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.76%. Comparing base (d3ba400) to head (2b47823).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2721      +/-   ##
==========================================
- Coverage   96.77%   96.76%   -0.01%     
==========================================
  Files         256      256              
  Lines        7897     7892       -5     
  Branches     2067     2061       -6     
==========================================
- Hits         7642     7637       -5     
+ Misses        255      254       -1     
- Partials        0        1       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Apr 19, 2025
@yurishkuro yurishkuro added this pull request to the merge queue Apr 19, 2025
Merged via the queue into jaegertracing:main with commit 72a976f Apr 19, 2025
9 of 10 checks passed
DamianMaslanka5 added a commit to DamianMaslanka5/jaeger-ui that referenced this pull request May 28, 2025
…p is selected

These changes are similar to my previous changes where I optimizing valueFirstDropdown jaegertracing#2721

To test:
1. Run go run cmd/tracegen/main.go -service abcd -traces 1 -spans 5000
1. Go to Trace Statistics page
1. Select attr_00 in Group By
1. Select attr_01 in Sub-Group (second dropdown)

Time before: 1s
Time after 16ms

Signed-off-by: Damian Maslanka <[email protected]>
DamianMaslanka5 added a commit to DamianMaslanka5/jaeger-ui that referenced this pull request May 28, 2025
…p is selected

These changes are similar to my previous changes where I optimized valueFirstDropdown jaegertracing#2721

To test:
1. Run go run cmd/tracegen/main.go -service abcd -traces 1 -spans 5000
1. Go to Trace Statistics page
1. Select attr_00 in Group By
1. Select attr_01 in Sub-Group (second dropdown)

Time before: 1s
Time after 16ms

Signed-off-by: Damian Maslanka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants