MCPcopy
hub / github.com/dgraph-io/dgraph / monitorRaftMetrics

Method monitorRaftMetrics

worker/draft.go:2035–2043  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2033}
2034
2035func (n *node) monitorRaftMetrics() {
2036 ticker := time.Tick(5 * time.Second)
2037
2038 for range ticker {
2039 curPendingSize := atomic.LoadInt64(&n.pendingSize)
2040 ostats.Record(n.ctx, x.RaftPendingSize.M(curPendingSize))
2041 ostats.Record(n.ctx, x.RaftApplyCh.M(int64(len(n.applyCh))))
2042 }
2043}

Callers 1

InitAndStartNodeMethod · 0.95

Calls 1

RecordMethod · 0.80

Tested by

no test coverage detected