code: func (m *Metric) Collect() (a AggregatedMetrics) {
  	for n := range m.collect(m.gen()) {
  		value := aggregate(n.Value)
  
  		switch n.Name {
  		case "Duration":
  			a.Duration = value
  		case "Errors":
  			a.Errors = value
  		case "Invocations":
  			a.Invocations = value
  		case "Throttles":
  			a.Throttles = value
  		}
  	}
  
  	return
  }
docs: // Collect and aggregate metrics for on function.