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

Method GetPresetByID

coderd/database/dbmetrics/querymetrics.go:2397–2403  ·  view source on GitHub ↗
(ctx context.Context, presetID uuid.UUID)

Source from the content-addressed store, hash-verified

2395}
2396
2397func (m queryMetricsStore) GetPresetByID(ctx context.Context, presetID uuid.UUID) (database.GetPresetByIDRow, error) {
2398 start := time.Now()
2399 r0, r1 := m.s.GetPresetByID(ctx, presetID)
2400 m.queryLatencies.WithLabelValues("GetPresetByID").Observe(time.Since(start).Seconds())
2401 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetPresetByID").Inc()
2402 return r0, r1
2403}
2404
2405func (m queryMetricsStore) GetPresetByWorkspaceBuildID(ctx context.Context, workspaceBuildID uuid.UUID) (database.TemplateVersionPreset, error) {
2406 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetPresetByIDMethod · 0.65

Tested by

no test coverage detected