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

Method GetFileByID

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

Source from the content-addressed store, hash-verified

1875}
1876
1877func (m queryMetricsStore) GetFileByID(ctx context.Context, id uuid.UUID) (database.File, error) {
1878 start := time.Now()
1879 r0, r1 := m.s.GetFileByID(ctx, id)
1880 m.queryLatencies.WithLabelValues("GetFileByID").Observe(time.Since(start).Seconds())
1881 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetFileByID").Inc()
1882 return r0, r1
1883}
1884
1885func (m queryMetricsStore) GetFileTemplates(ctx context.Context, fileID uuid.UUID) ([]database.GetFileTemplatesRow, error) {
1886 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetFileByIDMethod · 0.65

Tested by

no test coverage detected