MCPcopy Index your code
hub / github.com/coder/coder / GetTemplateInsightsByInterval

Method GetTemplateInsightsByInterval

coderd/database/querier.go:716–716  ·  view source on GitHub ↗

GetTemplateInsightsByInterval returns all intervals between start and end time, if end time is a partial interval, it will be included in the results and that interval will be shorter than a full one. If there is no data for a selected interval/template, it will be included in the results with 0 act

(ctx context.Context, arg GetTemplateInsightsByIntervalParams)

Source from the content-addressed store, hash-verified

714 // that interval will be shorter than a full one. If there is no data for a selected
715 // interval/template, it will be included in the results with 0 active users.
716 GetTemplateInsightsByInterval(ctx context.Context, arg GetTemplateInsightsByIntervalParams) ([]GetTemplateInsightsByIntervalRow, error)
717 // GetTemplateInsightsByTemplate is used for Prometheus metrics. Keep
718 // in sync with GetTemplateInsights and UpsertTemplateUsageStats.
719 GetTemplateInsightsByTemplate(ctx context.Context, arg GetTemplateInsightsByTemplateParams) ([]GetTemplateInsightsByTemplateRow, error)

Callers 5

returnDAUsInternalMethod · 0.65
insightsTemplatesMethod · 0.65
TestTemplateMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 1

TestTemplateMethod · 0.52