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

Method GetReplicaByID

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

Source from the content-addressed store, hash-verified

2603}
2604
2605func (m queryMetricsStore) GetReplicaByID(ctx context.Context, id uuid.UUID) (database.Replica, error) {
2606 start := time.Now()
2607 r0, r1 := m.s.GetReplicaByID(ctx, id)
2608 m.queryLatencies.WithLabelValues("GetReplicaByID").Observe(time.Since(start).Seconds())
2609 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "GetReplicaByID").Inc()
2610 return r0, r1
2611}
2612
2613func (m queryMetricsStore) GetReplicasUpdatedAfter(ctx context.Context, updatedAt time.Time) ([]database.Replica, error) {
2614 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
GetReplicaByIDMethod · 0.65

Tested by

no test coverage detected