Skip to content

feat(coderd/database): use template_usage_stats in GetUserLatencyInsights query #12671

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 3 commits into from
Mar 25, 2024

Conversation

mafredri
Copy link
Member

@mafredri mafredri commented Mar 19, 2024

This PR updates the GetUserLatencyInsights query to use rolled up template_usage_stats instead of raw agent and app stats.

@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from 59c0a23 to db40db5 Compare March 20, 2024 10:25
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from c0b0216 to 1793acb Compare March 20, 2024 10:25
@@ -98,7 +98,8 @@ type UserActivity struct {
// ConnectionLatency shows the latency for a connection.
type ConnectionLatency struct {
P50 float64 `json:"p50" example:"31.312"`
P95 float64 `json:"p95" example:"119.832"`
Copy link
Member

Choose a reason for hiding this comment

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

Is this change intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was, but I reverted it. (It was based on a discussion in Slack where p90/p99 would be preferable over p95, and since this p95 isn't used anywhere, the change would be harmless, but this is not the right place for it.)

@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from db40db5 to 689d1c9 Compare March 20, 2024 12:37
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 1793acb to 91d960f Compare March 20, 2024 12:37
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from 689d1c9 to 6d96a3e Compare March 20, 2024 14:53
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 91d960f to 83f3b78 Compare March 20, 2024 14:53
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from 6d96a3e to 754d6c1 Compare March 20, 2024 16:02
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 83f3b78 to 2947a31 Compare March 20, 2024 16:02
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from ef0f1bc to a6a8055 Compare March 20, 2024 19:04
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 2947a31 to da749ae Compare March 20, 2024 19:04
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from a6a8055 to 23cf1c6 Compare March 20, 2024 19:19
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from da749ae to 6027088 Compare March 20, 2024 19:19
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsightsbytemplate branch from 23cf1c6 to b11b3b6 Compare March 20, 2024 19:56
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 6027088 to e0f339c Compare March 20, 2024 19:56
@mafredri mafredri changed the base branch from mafredri/rewrite-gettemplateappinsightsbytemplate to mafredri/rewrite-gettemplateappinsights March 21, 2024 15:07
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from e0f339c to e66ae18 Compare March 21, 2024 15:07
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 87f22f1 to 2cf5f94 Compare March 21, 2024 17:54
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from e66ae18 to 150df95 Compare March 21, 2024 17:54
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 2cf5f94 to 02d0f24 Compare March 21, 2024 18:06
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 150df95 to 11efd8b Compare March 21, 2024 18:06
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 02d0f24 to dfa069b Compare March 22, 2024 15:40
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 11efd8b to 92a0a25 Compare March 22, 2024 15:40
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from dfa069b to 6fca988 Compare March 22, 2024 17:11
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 92a0a25 to ac22243 Compare March 22, 2024 17:11
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 6fca988 to 0cd1f85 Compare March 22, 2024 17:15
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from ac22243 to c5457d4 Compare March 22, 2024 17:15
@mafredri mafredri changed the title feat(coderd/database): rewrite GetUserLatencyInsights to use template_usage_stats feat(coderd/database): use template_usage_stats in GetUserLatencyInsights query Mar 25, 2024
@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 0cd1f85 to 549a837 Compare March 25, 2024 11:18
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from c5457d4 to 48b0729 Compare March 25, 2024 11:18
@mafredri mafredri marked this pull request as ready for review March 25, 2024 13:02
Copy link
Member Author

mafredri commented Mar 25, 2024

Merge activity

  • Mar 25, 9:33 AM EDT: @mafredri started a stack merge that includes this pull request via Graphite.
  • Mar 25, 9:59 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 25, 10:07 AM EDT: @mafredri merged this pull request with Graphite.

@mafredri mafredri force-pushed the mafredri/rewrite-gettemplateappinsights branch from 549a837 to 6813b73 Compare March 25, 2024 13:46
Base automatically changed from mafredri/rewrite-gettemplateappinsights to main March 25, 2024 13:58
@mafredri mafredri force-pushed the mafredri/rewrite-getuserlatencyinsights branch from 7750bb6 to 438d3a9 Compare March 25, 2024 13:58
@mafredri mafredri merged commit a8ed689 into main Mar 25, 2024
@mafredri mafredri deleted the mafredri/rewrite-getuserlatencyinsights branch March 25, 2024 14:07
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants