MCPcopy Create free account
hub / github.com/ethstorage/es-node / startReporter

Method startReporter

ethstorage/scanner/scanner.go:202–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200}
201
202func (s *Scanner) startReporter() {
203 s.wg.Add(1)
204 go func() {
205 defer s.wg.Done()
206
207 localKvCount, sum := s.worker.summaryLocalKvs()
208 s.lg.Info("Local storage summary", "localKvs", sum, "localKvCount", localKvCount)
209 ticker := time.NewTicker(time.Minute)
210 defer ticker.Stop()
211 for {
212 select {
213 case <-ticker.C:
214 s.logStats()
215 case <-s.ctx.Done():
216 return
217 }
218 }
219 }()
220}
221
222func (s *Scanner) launchFixLoop(interval time.Duration) {
223 s.wg.Add(1)

Callers 1

startMethod · 0.95

Calls 3

logStatsMethod · 0.95
summaryLocalKvsMethod · 0.80
StopMethod · 0.45

Tested by

no test coverage detected