function renameMetric (renames) {
  return function _renameMetric (metricInstances) {
    return metricInstances.map(mi => ({
      ...mi,
      metric: (mi.metric in renames) ? renames[mi.metric] : mi.metric
    }))
  }
}
Renames one or more metric names

@param {object} a rename mapping table
@return {function} a transform function