<p>
An array of metric results,, where each array element contains all of the data points for a particular dimension.
</p>

@param metricList
An array of metric results,, where each array element contains all of the data points for a particular
dimension.
545928
public void setMetricList(java.util.Collection<MetricKeyDataPoints> metricList) {
        if (metricList == null) {
            this.metricList = null;
            return;
        }

        this.metricList = new java.util.ArrayList<MetricKeyDataPoints>(metricList);
    }
1055453
@Override
    public List<Metric> transform(QueryContext context, List<Metric> metrics) {
        if (metrics.size() == 1) {
            return rangeOfOneMetric(metrics.get(0));
        } else {
            return new MetricReducerOrMappingTransform(new RangeValueReducerOrMapping()).transform(context, metrics);
        }
    }
1230049
private List<Metric> mapping(List<Metric> metrics) {
        SystemAssert.requireArgument(metrics != null, "Cannot transform empty metric/metrics");
        if (metrics.isEmpty()) {
            return metrics;
        }

        List<Metric> newMetricsList = new ArrayList<Metric>();

        for (Metric metric : metrics) {
            Map<Long, Double> cleanDatapoints = cleanDPs(metric.getDatapoints());

            metric.setDatapoints(this.valueMapping.mapping(cleanDatapoints));
            newMetricsList.add(metric);
        }
        return newMetricsList;
    }
1294845
@Nonnull
    public static List<Map.Entry<String, String>> parseMetricName(@Nonnull String metricName) {
        if (metricName.charAt(0) != '[' || metricName.charAt(metricName.length() - 1) != ']') {
            throw new IllegalArgumentException("key not enclosed in []: " + metricName);
        }

        StringBuilder sb = new StringBuilder();
        List<Map.Entry<String, String>> result = new ArrayList<Map.Entry<String, String>>();
        int l = metricName.length() - 1;
        String tag = null;
        boolean inTag = true;
        for (int i = 1; i < l; i++) {
            char ch = metricName.charAt(i);
            switch (ch) {
                case '=':
                    tag = handleEqualsSign(metricName, sb, inTag);
                    inTag = false;
                    continue;

                case ',':
                    handleComma(metricName, sb, result, tag, inTag);
                    inTag = true;
                    tag = null;
                    continue;

                default:
                    if (ch == '\\') {
                        // the next character will be treated literally
                        ch = metricName.charAt(++i);
                    }
                    if (i == l) {
                        throw new IllegalArgumentException("backslash at the end: " + metricName);
                    }
                    sb.append(ch);
            }
        }
        // final entry
        if (tag != null) {
            result.add(new SimpleImmutableEntry<String, String>(tag, sb.toString()));
        } else if (sb.length() > 0) {
            throw new IllegalArgumentException("unfinished tag at the end: " + metricName);
        }
        return result;
    }
590131
private void getMetrics(
      MBeanServerConnection con,
      MetricFilter filter,
      List<Metric> metrics,
      ObjectName name)
      throws JMException, IOException {
    // Create tags from the object name
    TagList tags = createTagList(name);
    MBeanInfo info = con.getMBeanInfo(name);
    MBeanAttributeInfo[] attrInfos = info.getAttributes();

    // Restrict to attributes that match the filter
    List<String> matchingNames = new ArrayList<>();
    for (MBeanAttributeInfo attrInfo : attrInfos) {
      String attrName = attrInfo.getName();
      if (filter.matches(new MonitorConfig.Builder(attrName).withTags(tags).build())) {
        matchingNames.add(attrName);
      }
    }
    List<Attribute> attributeList = safelyLoadAttributes(con, name, matchingNames);

    for (Attribute attr : attributeList) {
      String attrName = attr.getName();
      Object obj = attr.getValue();
      if (obj instanceof TabularData) {
        ((TabularData) obj).values().stream()
            .filter(key -> key instanceof CompositeData)
            .forEach(key -> addTabularMetrics(filter, metrics, tags, attrName,
                (CompositeData) key));
      } else if (obj instanceof CompositeData) {
        addCompositeMetrics(filter, metrics, tags, attrName, (CompositeData) obj);
      } else {
        addMetric(metrics, attrName, tags, obj);
      }
    }
  }
644267
def do_metric_name_list(mc, args):
    ''''''
    fields = {}
    if args.dimensions:
        fields['dimensions'] = utils.format_dimensions_query(args.dimensions)
    if args.limit:
        fields['limit'] = args.limit
    if args.offset:
        fields['offset'] = args.offset
    if args.tenant_id:
        fields['tenant_id'] = args.tenant_id

    try:
        metric_names = mc.metrics.list_names(**fields)
    except (osc_exc.ClientException, k_exc.HttpError) as he:
        raise osc_exc.CommandError('%s\n%s' % (he.message, he.details))
    else:
        if args.json:
            print(utils.json_formatter(metric_names))
            return
        if isinstance(metric_names, list):
            utils.print_list(metric_names, ['Name'], formatters={'Name': lambda x: x['name']})
905924
private void addMetrics(List<MetricDatum> list,
            MetricValues metricValues,
            StandardUnit unit) {
        List<MachineMetric> machineMetrics = metricValues.getMetrics();
        List<Long> values = metricValues.getValues();
        for (int i=0; i < machineMetrics.size(); i++) {
            MachineMetric metric = machineMetrics.get(i);
            long val = values.get(i).longValue();
            // skip zero values in some cases
            if (val != 0 || metric.includeZeroValue()) {
                MetricDatum datum = new MetricDatum()
                    .withMetricName(metric.getMetricName())
                    .withDimensions(
                        new Dimension()
                        .withName(metric.getDimensionName())
                        .withValue(metric.name()))
                    .withUnit(unit)
                    .withValue((double) val)
                    ;
                list.add(datum);
            }
        }
    }
711831
public List<OpenFalconBean> build(String metric, JSONArray valueJSONArray) {
        List<OpenFalconBean> beans = new ArrayList<>();
        for (Object value : valueJSONArray) {
            beans.addAll(buildAll(metric, value));
        }
        return beans;
    }
993
static List<DataPoint> adapt(Metric metric) {
    MetricDescriptor metricDescriptor = metric.getMetricDescriptor();
    MetricType metricType = getType(metricDescriptor.getType());
    if (metricType == null) {
      return Collections.emptyList();
    }

    DataPoint.Builder shared = DataPoint.newBuilder();
    shared.setMetric(metricDescriptor.getName());
    shared.setMetricType(metricType);

    ArrayList<DataPoint> datapoints = Lists.newArrayList();
    for (TimeSeries timeSeries : metric.getTimeSeriesList()) {
      DataPoint.Builder builder = shared.clone();
      builder.addAllDimensions(
          createDimensions(metricDescriptor.getLabelKeys(), timeSeries.getLabelValues()));

      List<Point> points = timeSeries.getPoints();
      datapoints.ensureCapacity(datapoints.size() + points.size());
      for (Point point : points) {
        datapoints.add(builder.setValue(createDatum(point.getValue())).build());
      }
    }
    return datapoints;
  }
1202442
public List<Metric> getAverages(int span) {
        Map<String,Metric> accum = new LinkedHashMap<>();
        int count = span / period;
        if (count > dataList.size())
            count = dataList.size();
        for (int i = dataList.size() - count; i < dataList.size(); i++) {
            MetricData metricData = dataList.get(i);
            for (Metric metric : metricData.getMetrics()) {
                Metric total = accum.get(metric.getName());
                if (total == null) {
                    total = new Metric(metric.getId(), metric.getName(), metric.getValue());
                    accum.put(metric.getName(), total);
                }
                else {
                    total.setValue(total.getValue() + metric.getValue());
                }
            }
        }
        for (Metric metric : accum.values()) {
            metric.setValue(Math.round((double)metric.getValue() / count));
        }
        return new ArrayList<>(accum.values());
    }
980927
public Page<Metric> listMetrics() {
    // [START listMetrics]
    Page<Metric> metrics = logging.listMetrics(ListOption.pageSize(100));
    for (Metric metric : metrics.iterateAll()) {
      // do something with the metric
    }
    // [END listMetrics]
    return metrics;
  }
237343
public void setDomainStatusList(java.util.Collection<ElasticsearchDomainStatus> domainStatusList) {
        if (domainStatusList == null) {
            this.domainStatusList = null;
            return;
        }

        this.domainStatusList = new java.util.ArrayList<ElasticsearchDomainStatus>(domainStatusList);
    }
1287743
public void setMetricData(java.util.Collection<MetricDatum> metricData) {
        if (metricData == null) {
            this.metricData = null;
            return;
        }

        this.metricData = new com.amazonaws.internal.SdkInternalList<MetricDatum>(metricData);
    }
937239
@Override
  public SortedMap<String, Gauge> getGauges(MetricFilter filter) {
    return this.innerMetricContext.getGauges(filter);
  }
481272
public void setMetricAlarms(java.util.Collection<MetricAlarm> metricAlarms) {
        if (metricAlarms == null) {
            this.metricAlarms = null;
            return;
        }

        this.metricAlarms = new com.amazonaws.internal.SdkInternalList<MetricAlarm>(metricAlarms);
    }
612476
public void setClientPropertiesList(java.util.Collection<ClientPropertiesResult> clientPropertiesList) {
        if (clientPropertiesList == null) {
            this.clientPropertiesList = null;
            return;
        }

        this.clientPropertiesList = new com.amazonaws.internal.SdkInternalList<ClientPropertiesResult>(clientPropertiesList);
    }
202773
@Override
	public List<Metric> transform(QueryContext queryContext, List<Metric> metrics, List<String> constants) {
		SystemAssert.requireArgument(metrics != null, "Metric List cannot be null");
		SystemAssert.requireArgument(constants != null && !constants.isEmpty(), "This Transform cannot be used without a constant");
		if (metrics.isEmpty()) {
			return metrics;
		}

		List<Metric> result = new ArrayList<Metric>();

		if (constants.size() == 1) {
			result = Arrays.asList(reduce(metrics, constants));
		} else if (constants.size() == 2 && constants.get(1).toUpperCase().equals(FULLJOIN)) {
			fulljoinIndicator = true;
			constants.remove(1);
			result = Arrays.asList(reduce(metrics, constants));
		}else if (constants.size() == 2 && constants.get(1).toUpperCase().equals(INTERSECT)) { 
			fulljoinIndicator = false;
			constants.remove(1);
			result = Arrays.asList(reduce(metrics, constants));	        
		}else if (constants.size() > 1) {
			result = mapping(metrics, constants);
		}
		return result;
	}