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(webapp): pass from,until when calling /label{-values} #1677

Merged
merged 10 commits into from
Nov 8, 2022

Conversation

eh-am
Copy link
Collaborator

@eh-am eh-am commented Nov 4, 2022

The backend expects from and until query parameters in the /labels and /label-values endpoints.

Here we pass them.

The catch is that to not have to have different set of tags for different time ranges, we just take the biggest time range between left/right/regular. This implies that we may pass a bigger time range than necessary, but it's fine.

Also this has another downside: every time the range changes, we also have to load labels again, which is redundant most of the times. In the future we may do some optimization like storing the {from, until} interval and only load when a different range outside the cached range is passed.
Also Store the {from, until} interval which an app loaded labels refers to. That way we don't have to reload again if loading from a subrange.

A small refactor, but removed TagsBar from Toolbar in SingleView to keep it consistent with the other views.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
webapp/public/assets/app.js 486.33 KB (+0.11% 🔺) 9.8 s (+0.11% 🔺) 3.6 s (+9.89% 🔺) 13.4 s
webapp/public/assets/app.css 18.62 KB (+0.05% 🔺) 373 ms (+0.05% 🔺) 0 ms (+100% 🔺) 373 ms
webapp/public/assets/styles.css 9.54 KB (0%) 191 ms (0%) 0 ms (+100% 🔺) 191 ms
packages/pyroscope-flamegraph/dist/index.js 130.03 KB (0%) 2.7 s (0%) 1.5 s (-8.57% 🔽) 4.1 s
packages/pyroscope-flamegraph/dist/index.node.js 130.73 KB (0%) 2.7 s (0%) 629 ms (+42.49% 🔺) 3.3 s
packages/pyroscope-flamegraph/dist/index.css 7.88 KB (0%) 158 ms (0%) 0 ms (+100% 🔺) 158 ms

@codecov
Copy link

codecov bot commented Nov 4, 2022

Codecov Report

Base: 66.68% // Head: 66.25% // Decreases project coverage by -0.44% ⚠️

Coverage data is based on head (6fdd3de) compared to base (3b4001f).
Patch coverage: 53.17% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1677      +/-   ##
==========================================
- Coverage   66.68%   66.25%   -0.43%     
==========================================
  Files         156      157       +1     
  Lines        5285     5344      +59     
  Branches     1208     1219      +11     
==========================================
+ Hits         3524     3540      +16     
- Misses       1755     1798      +43     
  Partials        6        6              
Impacted Files Coverage Δ
webapp/javascript/services/tags.ts 30.44% <45.46%> (-2.89%) ⬇️
webapp/javascript/redux/reducers/continuous.ts 26.96% <53.23%> (-2.14%) ⬇️
webapp/javascript/util/timerange.ts 60.00% <60.00%> (ø)
webapp/javascript/util/formatDate.ts 87.84% <100.00%> (+0.52%) ⬆️
...scope-flamegraph/src/convert/flamebearersToTree.ts 100.00% <0.00%> (ø)
...ope-flamegraph/src/convert/sandwichViewProfiles.ts 51.52% <0.00%> (ø)
...ph/src/FlameGraph/FlameGraphComponent/LogoLink.tsx 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@eh-am
Copy link
Collaborator Author

eh-am commented Nov 7, 2022

/create-server

@eh-am eh-am marked this pull request as ready for review November 7, 2022 11:55
@eh-am eh-am marked this pull request as draft November 7, 2022 19:07
@eh-am eh-am marked this pull request as ready for review November 8, 2022 10:18
@eh-am eh-am merged commit a82077d into main Nov 8, 2022
@eh-am eh-am deleted the fix/add-timerange-to-labels branch November 8, 2022 10:20
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.

1 participant