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

feat(coderd/database): usetemplate_usage_stats inGetTemplateAppInsights query#12669

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

Merged
mafredri merged 5 commits intomainfrommafredri/rewrite-gettemplateappinsights
Mar 25, 2024

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedMar 19, 2024
edited
Loading

This PR updates theGetTemplateAppInsights query to use rolled uptemplate_usage_stats instead of raw agent and app stats.

@mafredriGraphite App
Copy link
MemberAuthor

mafredri commentedMar 19, 2024
edited
Loading

@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch fromf369461 to2eae8f8CompareMarch 19, 2024 16:24
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from7fa004c tod384842CompareMarch 19, 2024 16:25
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch from2eae8f8 to4ae3521CompareMarch 20, 2024 10:25
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch fromd384842 toc10b34bCompareMarch 20, 2024 10:25
wa.agent_id = was.agent_id
AND wa.slug = was.slug_or_port
WITH
app_insights AS (
Copy link
Member

Choose a reason for hiding this comment

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

nit: you may want to drop a comment here, many joins around

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Hmm, in my opinion it's a self-contained sequence of joins and there is a comment inline, is there something more you would like explained in the comment? This is a common pattern when we need to lookup agent (or in our case app) -> template association.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, exactly this :)

prevent going through joins and "fast-forward" reading query code by human

@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch from4ae3521 to2ac8855CompareMarch 20, 2024 12:37
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch fromc10b34b toc45caebCompareMarch 20, 2024 12:37
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch 2 times, most recently fromeb52bb7 to37f6f3aCompareMarch 20, 2024 14:53
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch fromc45caeb tod481905CompareMarch 20, 2024 14:53
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch from37f6f3a to70ba902CompareMarch 20, 2024 16:02
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from3d14fe4 to04b5c07CompareMarch 20, 2024 16:02
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch from70ba902 to4d27721CompareMarch 20, 2024 19:04
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from11871be to8a9eb15CompareMarch 20, 2024 19:04
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch from4d27721 to53a54b0CompareMarch 20, 2024 19:19
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from8a9eb15 to772aa60CompareMarch 20, 2024 19:19
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from772aa60 to460c244CompareMarch 20, 2024 19:55
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbytemplate branch froma234c5d to02b3828CompareMarch 21, 2024 12:46
@mafredrimafredri changed the base branch frommafredri/rewrite-gettemplateinsightsbytemplate tomafredri/rewrite-gettemplateinsightsbyintervalMarch 21, 2024 15:06
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from460c244 to87f22f1CompareMarch 21, 2024 15:06
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch from958785d to05780dbCompareMarch 21, 2024 17:54
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch 2 times, most recently from2cf5f94 to02d0f24CompareMarch 21, 2024 18:06
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch from05780db to3c67005CompareMarch 22, 2024 15:40
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from02d0f24 todfa069bCompareMarch 22, 2024 15:40
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch from3c67005 tobf27a9fCompareMarch 22, 2024 17:11
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch fromdfa069b to6fca988CompareMarch 22, 2024 17:11
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch frombf27a9f to8b32a8cCompareMarch 22, 2024 17:15
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from6fca988 to0cd1f85CompareMarch 22, 2024 17:15
@mafredrimafredri changed the titlefeat(coderd/database): rewriteGetTemplateAppInsights to usetemplate_usage_statsfeat(coderd/database): usetemplate_usage_stats inGetTemplateAppInsights queryMar 25, 2024
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch from8b32a8c tobfe4b8aCompareMarch 25, 2024 11:18
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from0cd1f85 to549a837CompareMarch 25, 2024 11:18
@mafredrimafredri marked this pull request as ready for reviewMarch 25, 2024 12:57
@mafredriGraphite App
Copy link
MemberAuthor

mafredri commentedMar 25, 2024
edited
Loading

Merge activity

  • Mar 25, 9:33 AM EDT:@mafredri started a stack merge that includes this pull request viaGraphite.
  • Mar 25, 9:47 AM EDT:Graphite rebased this pull request as part of a merge.
  • Mar 25, 9:58 AM EDT:@mafredri merged this pull request withGraphite.

@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateinsightsbyinterval branch frombfe4b8a tocb74f29CompareMarch 25, 2024 13:33
Base automatically changed frommafredri/rewrite-gettemplateinsightsbyinterval tomainMarch 25, 2024 13:45
@mafredrimafredriforce-pushed themafredri/rewrite-gettemplateappinsights branch from549a837 to6813b73CompareMarch 25, 2024 13:46
@mafredrimafredri merged commit5738a03 intomainMar 25, 2024
@mafredrimafredri deleted the mafredri/rewrite-gettemplateappinsights branchMarch 25, 2024 13:58
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 25, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp