Example #1
0
func getOptimizerStats(dict state.Dict) (stats map[uint64]optimizerStat) {
	stats = make(map[uint64]optimizerStat)
	dict.ForEach(func(k string, v interface{}) bool {
		id := parseBeeID(k)
		stats[id] = v.(optimizerStat)
		return true
	})
	return
}
Example #2
0
func (c optimizerCollector) isMigrated(b uint64, optDict state.Dict) bool {
	v, err := optDict.Get(formatBeeID(b))
	return err == nil && v.(optimizerStat).Migrated
}