Would it make sense to change this to accept MultiMap<IMetric> instead of collection so we don't scan the metrics twice?