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

Method GetAIProviderByID

coderd/database/dbmetrics/querymetrics.go:1053–1059  ·  view source on GitHub ↗
(ctx context.Context, id uuid.UUID)

Source from the content-addressed store, hash-verified

1051}
1052
1053func (m queryMetricsStore) GetAIProviderByID(ctx context.Context, id uuid.UUID) (database.AIProvider, error) {
1054 start := time.Now()
1055 r0, r1 := m.s.GetAIProviderByID(ctx, id)
1056 m.queryLatencies.WithLabelValues("GetAIProviderByID").Observe(time.Since(start).Seconds())
1057 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetAIProviderByID").Inc()
1058 return r0, r1
1059}
1060
1061func (m queryMetricsStore) GetAIProviderByIDForReferenceLock(ctx context.Context, id uuid.UUID) (database.AIProvider, error) {
1062 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetAIProviderByIDMethod · 0.65

Tested by

no test coverage detected