See {@link com.codahale.metrics.MetricRegistry#getHistograms(com.codahale.metrics.MetricFilter)}.

<p>
This method will return fully-qualified metric names if the {@link MetricContext} is configured
to report fully-qualified metric names.
</p>
172595
@Override
  public SortedMap<String, Histogram> getHistograms(MetricFilter filter) {
    return getSimplyNamedMetrics(Histogram.class, Optional.of(filter));
  }
682158
private Collection<MetricDatum> filterOSMetrics(Collection<MetricDatum> data) {
        Collection<MetricDatum> output = new ArrayList<MetricDatum>(data.size());
        for (MetricDatum datum: data) {
            if (!OS_METRIC_NAME.equals(datum.getMetricName()))
                output.add(datum);
        }
        return output;
    }
849598
@Override
  public SortedMap<String, Meter> getMeters(MetricFilter filter) {
    return this.innerMetricContext.getMeters(filter);
  }
401918
@Override
  public SortedMap<String, Gauge> getGauges(MetricFilter filter) {
    return getSimplyNamedMetrics(Gauge.class, Optional.of(filter));
  }
1344111
public MetricFilter metricsFilter() {
        if (id() == null) {
            return (name, metric) -> false;
        }
        return (name, metric) -> metricNames.contains(name);

    }
1260341
public static synchronized MetricsContext getNullContext(String contextName) {
    MetricsContext nullContext = nullContextMap.get(contextName);
    if (nullContext == null) {
      nullContext = new NullContext();
      nullContextMap.put(contextName, nullContext);
    }
    return nullContext;
  }
503963
public String[] getJ2EEStatisticNames() {
        ArrayList members = copyStatistics();
        if (members == null)
            return new String[0];

        String[] ret = new String[members.size()];
        for (int i = 0; i < ret.length; i++) {
            if (members.get(i) != null)
                ret[i] = ((StatisticImpl) members.get(i)).getName();
        }
        return ret;
    }
1099561
protected String getMetricNamePrefix(Map<String, Object> tags){
    String currentContextName = (String) tags.get(MetricContext.METRIC_CONTEXT_NAME_TAG_NAME);
    if (metricContextName == null || (currentContextName.indexOf(metricContextName) > -1)) {
      return currentContextName;
    }

    return JOINER.join(Strings.emptyToNull(metricsPrefix),
            metricContextName, tags.get("taskId"), tags.get("forkBranchName"), tags.get("class"));
  }
925317
private Histogram getRefinedHistogram(SalesforceConnector connector, String entity, String watermarkColumn,
      SourceState state, Partition partition, Histogram histogram) {
    final int maxPartitions = state.getPropAsInt(ConfigurationKeys.SOURCE_MAX_NUMBER_OF_PARTITIONS,
        ConfigurationKeys.DEFAULT_MAX_NUMBER_OF_PARTITIONS);
    final int probeLimit = state.getPropAsInt(DYNAMIC_PROBING_LIMIT, DEFAULT_DYNAMIC_PROBING_LIMIT);
    final int minTargetPartitionSize = state.getPropAsInt(MIN_TARGET_PARTITION_SIZE, DEFAULT_MIN_TARGET_PARTITION_SIZE);
    final Histogram outputHistogram = new Histogram();
    final double probeTargetRatio = state.getPropAsDouble(PROBE_TARGET_RATIO, DEFAULT_PROBE_TARGET_RATIO);
    final int bucketSizeLimit =
        (int) (probeTargetRatio * computeTargetPartitionSize(histogram, minTargetPartitionSize, maxPartitions));

    log.info("Refining histogram with bucket size limit {}.", bucketSizeLimit);

    HistogramGroup currentGroup;
    HistogramGroup nextGroup;
    final TableCountProbingContext probingContext =
        new TableCountProbingContext(connector, entity, watermarkColumn, bucketSizeLimit, probeLimit);

    if (histogram.getGroups().isEmpty()) {
      return outputHistogram;
    }

    // make a copy of the histogram list and add a dummy entry at the end to avoid special processing of the last group
    List<HistogramGroup> list = new ArrayList(histogram.getGroups());
    Date hwmDate = Utils.toDate(partition.getHighWatermark(), Partitioner.WATERMARKTIMEFORMAT);
    list.add(new HistogramGroup(Utils.epochToDate(hwmDate.getTime(), SECONDS_FORMAT), 0));

    for (int i = 0; i < list.size() - 1; i++) {
      currentGroup = list.get(i);
      nextGroup = list.get(i + 1);

      // split the group if it is larger than the bucket size limit
      if (currentGroup.count > bucketSizeLimit) {
        long startEpoch = Utils.toDate(currentGroup.getKey(), SECONDS_FORMAT).getTime();
        long endEpoch = Utils.toDate(nextGroup.getKey(), SECONDS_FORMAT).getTime();

        outputHistogram.add(getHistogramByProbing(probingContext, currentGroup.count, startEpoch, endEpoch));
      } else {
        outputHistogram.add(currentGroup);
      }
    }

    log.info("Executed {} probes for refining the histogram.", probingContext.probeCount);

    // if the probe limit has been reached then print a warning
    if (probingContext.probeCount >= probingContext.probeLimit) {
      log.warn("Reached the probe limit");
    }

    return outputHistogram;
  }
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);
        }
    }
958819
@Override
  public String metricNamePrefix(boolean includeTagKeys) {
    return Joiner.on('.').join(includeTagKeys ? getTags() : this.tags.values());
  }
318074
def __get_metrics(self):
        
        esfilters_closed = None
        esfilters_opened = None
        if self.esfilters:
            esfilters_closed = self.esfilters.copy()
            esfilters_opened = self.esfilters.copy()

        closed = self.closed_class(self.es_url, self.es_index,
                                   start=self.start, end=self.end,
                                   esfilters=esfilters_closed, interval=self.interval)
        opened = self.opened_class(self.es_url, self.es_index,
                                   start=self.start, end=self.end,
                                   esfilters=esfilters_opened, interval=self.interval)
        return (closed, opened)
1239774
@Override
    public List<Metric> transform(QueryContext context, List<Metric> metrics) {
        List<String> l = new ArrayList<String>();
        int size = metrics.get(0).getDatapoints().size();
        if (size >= 52 * 2) {
            l.add(0, "52");
        } else {
            l.add(0, Integer.toString(size/2));
        }
        return transform(null, metrics, l);
    }
1077343
protected List<Metric> mapping(List<Metric> metrics, List<String> constants) {
		SystemAssert.requireArgument(metrics != null, "Cannot transform null metrics");

		if (metrics.isEmpty()) {
			return metrics;
		}

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

		for (Metric metric : metrics) {
			metric.setDatapoints(this.valueReducerOrMapping.mapping(metric.getDatapoints(), constants));
			newMetricsList.add(metric);
		}
		return newMetricsList;
	}
339491
public java.util.List<MetricFilter> getMetricFilters() {
        if (metricFilters == null) {
            metricFilters = new com.amazonaws.internal.SdkInternalList<MetricFilter>();
        }
        return metricFilters;
    }
683506
@Override
    public  Set<Method> getDeclaredMethods(MethodFilter methodFilter) {
        return MethodUtils.getDeclaredMethods(target, methodFilter);
    }
8107
@Override
	public double[][] getHistogram(int numberOfPoints, double standardDeviations) {
		double[] intervalPoints = new double[numberOfPoints];
		double[] anchorPoints	= new double[numberOfPoints+1];
		double center	= getAverage();
		double radius	= standardDeviations * getStandardDeviation();
		double stepSize	= (numberOfPoints-1) / 2.0;
		for(int i=0; i<numberOfPoints;i++) {
			double alpha = (-(double)(numberOfPoints-1) / 2.0 + i) / stepSize;
			intervalPoints[i]	= center + alpha * radius;
			anchorPoints[i]		= center + alpha * radius - radius / (2 * stepSize);
		}
		anchorPoints[numberOfPoints] = center + 1 * radius + radius / (2 * stepSize);

		double[][] result = new double[2][];
		result[0] = anchorPoints;
		result[1] = getHistogram(intervalPoints);

		return result;
	}