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

Method GetWorkspaceAgentUsageStats

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

`minute_buckets` could return 0 rows if there are no usage stats since `created_at`.

(ctx context.Context, createdAt time.Time)

Source from the content-addressed store, hash-verified

856 GetWorkspaceAgentStatsAndLabels(ctx context.Context, createdAt time.Time) ([]GetWorkspaceAgentStatsAndLabelsRow, error)
857 // `minute_buckets` could return 0 rows if there are no usage stats since `created_at`.
858 GetWorkspaceAgentUsageStats(ctx context.Context, createdAt time.Time) ([]GetWorkspaceAgentUsageStatsRow, error)
859 GetWorkspaceAgentUsageStatsAndLabels(ctx context.Context, createdAt time.Time) ([]GetWorkspaceAgentUsageStatsAndLabelsRow, error)
860 GetWorkspaceAgentsByInstanceID(ctx context.Context, authInstanceID string) ([]WorkspaceAgent, error)
861 GetWorkspaceAgentsByParentID(ctx context.Context, parentID uuid.UUID) ([]WorkspaceAgent, error)

Callers 5

createSnapshotMethod · 0.65
TestSystemFunctionsMethod · 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 2

TestSystemFunctionsMethod · 0.52