Example #1
0
func (s *statsManager) runStatsDumpLogger() {
	for {
		stats := s.stats.Get()
		if stats != nil {
			bytes, _ := stats.MarshalJSON()
			logging.Infof("PeriodicStats = %s", string(bytes))
		}

		time.Sleep(time.Second * time.Duration(platform.LoadUint64(&s.statsLogDumpInterval)))
	}
}
Example #2
0
func addToMap(m map[string]uint64, i int, counters [257]platform.AlignedUint64) {
	v := platform.LoadUint64(&counters[i])
	if v > 0 {
		k := "unknown"
		if i < 256 {
			k = transport.CommandCode(i).String()
		}
		m[k] = v
		m["total"] += v
	}
}
func (fdb *fdbSlice) GetCommittedCount() uint64 {
	return platform.LoadUint64(&fdb.committedCount)
}