code: func (m *UnpartitionedMemoryIdx) Load(defs []schema.MetricDefinition) int {
  	m.Lock()
  	defer m.Unlock()
  	var pre time.Time
  	var num int
  	for i := range defs {
  		def := &defs[i]
  		pre = time.Now()
  		if _, ok := m.defById[def.Id]; ok {
  			continue
  		}
  
  		m.add(def)
  
  		if TagSupport {
  			m.indexTags(def)
  		}
  
  		// as we are loading the metricDefs from a persistent store, set the lastSave
  		// to the lastUpdate timestamp.  This won't exactly match the true lastSave Timstamp,
  		// but it will be close enough and it will always be true that the lastSave was at
  		// or after this time.  For metrics that are sent at or close to real time (the typical
  		// use case), then the value will be within a couple of seconds of the true lastSave.
  		m.defById[def.Id].LastSave = uint32(def.LastUpdate)
  		num++
  		statMetricsActive.Inc()
  		statAddDuration.Value(time.Since(pre))
  	}
  	return num
  }
docs: // Used to rebuild the index from an existing set of metricDefinitions.