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

Method Ping

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

Source from the content-addressed store, hash-verified

76}
77
78func (m queryMetricsStore) Ping(ctx context.Context) (time.Duration, error) {
79 start := time.Now()
80 duration, err := m.s.Ping(ctx)
81 m.queryLatencies.WithLabelValues("Ping").Observe(time.Since(start).Seconds())
82 m.queryCounts.WithLabelValues(httpmw.ExtractHTTPRoute(ctx), httpmw.ExtractHTTPMethod(ctx), "Ping").Inc()
83 return duration, err
84}
85
86func (m queryMetricsStore) PGLocks(ctx context.Context) (database.PGLocks, error) {
87 start := time.Now()

Callers

nothing calls this directly

Calls 4

ExtractHTTPRouteFunction · 0.92
ExtractHTTPMethodFunction · 0.92
WithLabelValuesMethod · 0.80
PingMethod · 0.65

Tested by

no test coverage detected