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

Use clean window period variables #16354

Closed
desa opened this issue Dec 30, 2019 · 2 comments · Fixed by #16536
Closed

Use clean window period variables #16354

desa opened this issue Dec 30, 2019 · 2 comments · Fixed by #16536
Assignees
Labels

Comments

@desa
Copy link
Contributor

desa commented Dec 30, 2019

Currently, when we calculate window period we do

const queryDuration = getMinDurationFromAST(substitutedAST)
return Math.round(queryDuration / DESIRED_POINTS_PER_GRAPH)

The result is that we end up sending a lot more data to the client than what we would expect.

We should have pre-defined bucket sizes like 10s, 30s, 1m, 5m, 10m, 30m, 60m, etc and round to the nearest depending on the duration of the query.

@desa desa added the team/ui label Dec 30, 2019
@ebb-tide ebb-tide self-assigned this Jan 2, 2020
@ebb-tide
Copy link
Contributor

ebb-tide commented Jan 2, 2020

currently the duration to window period relationship is

duration window period change to
5m 0.83s 10s
15m 2.5s 10s
1h 10s 1m
6h 60s
12h 120s 2m
24h 240s 4m
2d 480s 8m
...

what would be a more appropriate relationship do you think?

@ebb-tide
Copy link
Contributor

ebb-tide commented Jan 3, 2020

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 a pull request may close this issue.

2 participants