code: func (l MetricList) ByKey() map[int32][]*types.PerfMetricId {
  	ids := make(map[int32][]*types.PerfMetricId, len(l))
  
  	for i := range l {
  		id := &l[i]
  		ids[id.CounterId] = append(ids[id.CounterId], id)
  	}
  
  	return ids
  }
docs: // ByKey converts MetricList to map, where key is types.PerfMetricId.CounterId / types.PerfCounterInfo.Key