Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(coderd): use insights for DAUs, simplify metricscache#12775

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedMar 27, 2024
edited
Loading

This PR simplifies the DAU logic by relying on rolled up insights giving us great query performance and removing the need for caching each individual timezone.

For this fix, I opted not to refactor the WebUI requests to usestart_time=...&end_time=... like template insights requests do. Instead I retrofitted this logic on the/daus API endpoints using the TZ offset.

I also opted to always return 60 days (2 months), just because the way this is used it doesn't make sense to return more.

In the future, we can request this data from/insights/templates?section=interval&start_time=&end_time&interval=day instead, this also takes care of the 60 days hardcoding.

Fixes#12134
Fixeshttps://github.com/coder/customers/issues/384
Refs#12122

@mafredriGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed by Graphite.Learn more about stacking.

Join@mafredri and the rest of your teammates onGraphiteGraphite

@mafredrimafredriforce-pushed themafredri/03-27-fix_coderd_use_insights_for_daus_simplify_metricscache branch from8770c0f to2b3b5daCompareMarch 27, 2024 13:48
@mafredrimafredri marked this pull request as ready for reviewMarch 27, 2024 13:50
Copy link
Member

@kylecarbskylecarbs left a comment

Choose a reason for hiding this comment

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

Code deletion 🤤🤤🤤

@f0ssel
Copy link
Contributor

This was an area I spotted as a rough patch in our code, very happy to see significant deletions here!

Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@EmyrkEmyrk left a comment

Choose a reason for hiding this comment

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

❤️

@mafredrimafredri merged commit421bf7e intomainMar 27, 2024
@mafredrimafredri deleted the mafredri/03-27-fix_coderd_use_insights_for_daus_simplify_metricscache branchMarch 27, 2024 16:10
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 27, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@EmyrkEmyrkEmyrk approved these changes

@kylecarbskylecarbskylecarbs approved these changes

@mtojekmtojekmtojek approved these changes

@coadlercoadlerAwaiting requested review from coadler

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

A slow SQL query is causing high database load
5 participants
@mafredri@f0ssel@Emyrk@kylecarbs@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp