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

Method PGLocks

coderd/database/dbmetrics/querymetrics.go:86–92  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

84}
85
86func (m queryMetricsStore) PGLocks(ctx context.Context) (database.PGLocks, error) {
87 start := time.Now()
88 locks, err := m.s.PGLocks(ctx)
89 m.queryLatencies.WithLabelValues("PGLocks").Observe(time.Since(start).Seconds())
90 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "PGLocks").Inc()
91 return locks, err
92}
93
94func (m queryMetricsStore) InTx(f func(database.Store) error, options *database.TxOptions) error {
95 return m.dbMetrics.InTx(f, options)

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
PGLocksMethod · 0.65

Tested by

no test coverage detected