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

Method GetTaskSnapshot

coderd/database/dbmetrics/querymetrics.go:2693–2699  ·  view source on GitHub ↗
(ctx context.Context, taskID uuid.UUID)

Source from the content-addressed store, hash-verified

2691}
2692
2693func (m queryMetricsStore) GetTaskSnapshot(ctx context.Context, taskID uuid.UUID) (database.TaskSnapshot, error) {
2694 start := time.Now()
2695 r0, r1 := m.s.GetTaskSnapshot(ctx, taskID)
2696 m.queryLatencies.WithLabelValues("GetTaskSnapshot").Observe(time.Since(start).Seconds())
2697 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetTaskSnapshot").Inc()
2698 return r0, r1
2699}
2700
2701func (m queryMetricsStore) GetTelemetryItem(ctx context.Context, key string) (database.TelemetryItem, error) {
2702 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetTaskSnapshotMethod · 0.65

Tested by

no test coverage detected