MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / handleStats

Method handleStats

rest/api.go:750–757  ·  view source on GitHub ↗

ADMIN API to expose runtime and other stats

()

Source from the content-addressed store, hash-verified

748
749// ADMIN API to expose runtime and other stats
750func (h *handler) handleStats() error {
751 st := stats{}
752 runtime.ReadMemStats(&st.MemStats)
753 h.writeJSON(st)
754
755 base.Audit(h.ctx(), base.AuditIDSyncGatewayStats, base.AuditFields{base.AuditFieldStatsFormat: "memstats"})
756 return nil
757}
758
759func (h *handler) handleMetrics() error {
760 promhttp.Handler().ServeHTTP(h.response, h.rq)

Callers

nothing calls this directly

Calls 3

writeJSONMethod · 0.95
ctxMethod · 0.95
AuditFunction · 0.92

Tested by

no test coverage detected