code: func (m *Manager) CounterInfoByKey(ctx context.Context) (map[int32]*types.PerfCounterInfo, error) {
  	m.infoByKey.Lock()
  	defer m.infoByKey.Unlock()
  
  	if m.infoByKey.m != nil {
  		return m.infoByKey.m, nil
  	}
  
  	info, err := m.CounterInfo(ctx)
  	if err != nil {
  		return nil, err
  	}
  
  	m.infoByKey.m = make(map[int32]*types.PerfCounterInfo)
  
  	for i := range info {
  		c := &info[i]
  
  		m.infoByKey.m[c.Key] = c
  	}
  
  	return m.infoByKey.m, nil
  }
docs: // CounterInfoByKey converts the PerformanceManager.PerfCounter property to a map,
  // where key is types.PerfCounterInfo.Key.