Skip to content

Commit 71bfa51

Browse files
committed
revert p95 -> p90/p99 change
1 parent b2c2c4b commit 71bfa51

File tree

10 files changed

+16
-38
lines changed

10 files changed

+16
-38
lines changed

coderd/apidoc/docs.go

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/apidoc/swagger.json

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/dbmem/dbmem.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4350,8 +4350,7 @@ func (q *FakeQuerier) GetUserLatencyInsights(_ context.Context, arg database.Get
43504350
AvatarURL: user.AvatarURL,
43514351
TemplateIDs: templateIDs,
43524352
WorkspaceConnectionLatency50: tryPercentile(latencies, 50),
4353-
WorkspaceConnectionLatency90: tryPercentile(latencies, 90),
4354-
WorkspaceConnectionLatency99: tryPercentile(latencies, 99),
4353+
WorkspaceConnectionLatency95: tryPercentile(latencies, 95),
43554354
}
43564355
rows = append(rows, row)
43574356
}

coderd/database/queries.sql.go

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/insights.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ SELECT
99
u.avatar_url,
1010
array_agg(DISTINCT tus.template_id)::uuid[] AS template_ids,
1111
COALESCE((PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY tus.median_latency_ms)), -1)::float AS workspace_connection_latency_50,
12-
COALESCE((PERCENTILE_CONT(0.90) WITHIN GROUP (ORDER BY tus.median_latency_ms)), -1)::float AS workspace_connection_latency_90,
13-
COALESCE((PERCENTILE_CONT(0.99) WITHIN GROUP (ORDER BY tus.median_latency_ms)), -1)::float AS workspace_connection_latency_99
12+
COALESCE((PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY tus.median_latency_ms)), -1)::float AS workspace_connection_latency_95
1413
FROM
1514
template_usage_stats tus
1615
JOIN

coderd/insights.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ func (api *API) insightsUserLatency(rw http.ResponseWriter, r *http.Request) {
215215
AvatarURL: row.AvatarURL,
216216
LatencyMS: codersdk.ConnectionLatency{
217217
P50: row.WorkspaceConnectionLatency50,
218-
P90: row.WorkspaceConnectionLatency90,
219-
P99: row.WorkspaceConnectionLatency99,
218+
P95: row.WorkspaceConnectionLatency95,
220219
},
221220
})
222221
}

codersdk/insights.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ type UserActivity struct {
9898
// ConnectionLatency shows the latency for a connection.
9999
type ConnectionLatency struct {
100100
P50 float64 `json:"p50" example:"31.312"`
101-
P90 float64 `json:"p90" example:"119.832"`
102-
P99 float64 `json:"p99" example:"432.34"`
101+
P95 float64 `json:"p95" example:"119.832"`
103102
}
104103

105104
type UserLatencyInsightsRequest struct {

docs/api/insights.md

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/api/schemas.md

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/typesGenerated.ts

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)