MCPcopy Create free account
hub / github.com/deepflowio/deepflow / WriteCk

Method WriteCk

server/querier/statsd/statsd.go:51–65  ·  view source on GitHub ↗
(qc *ClickhouseCounter)

Source from the content-addressed store, hash-verified

49}
50
51func (c *Counter) WriteCk(qc *ClickhouseCounter) {
52 go func() {
53 c.writeCkM.Lock()
54 defer c.writeCkM.Unlock()
55 c.ck.ResponseSize += qc.ResponseSize
56 c.ck.RowCount += qc.RowCount
57 c.ck.ColumnCount += qc.ColumnCount * qc.RowCount
58 c.ck.QueryCount++
59
60 c.ck.QueryTimeSum += qc.QueryTime
61 if qc.QueryTime > c.ck.QueryTimeMax {
62 c.ck.QueryTimeMax = qc.QueryTime
63 }
64 }()
65}
66
67func (c *Counter) WriteApi(qc *ClickhouseCounter) {
68 go func() {

Callers 1

DoQueryMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected