@Test public void testMetricFamilySamples() { Collector g = Gauge.build().name("g").help("h").register(registry); Collector c = Counter.build().name("c").help("h").register(registry); Collector s = Summary.build().name("s").help("h").register(registry); Collector ec = new EmptyCollector().register(registry); HashSet<String> names = new HashSet<String>(); for (Collector.MetricFamilySamples metricFamilySamples : Collections.list(registry.metricFamilySamples())) { names.add(metricFamilySamples.name); } assertEquals(new HashSet<String>(Arrays.asList("g", "c", "s")), names); }
public Enumeration<Collector.MetricFamilySamples> metricFamilySamples() { return new MetricFamilySamplesEnumeration(); }
CollectorRegistry { public Enumeration<Collector.MetricFamilySamples> metricFamilySamples() { return new MetricFamilySamplesEnumeration(); } }
CollectorRegistry { public Enumeration<Collector.MetricFamilySamples> metricFamilySamples() { return new MetricFamilySamplesEnumeration(); } CollectorRegistry();  CollectorRegistry(boolean autoDescribe); }
CollectorRegistry { public Enumeration<Collector.MetricFamilySamples> metricFamilySamples() { return new MetricFamilySamplesEnumeration(); } CollectorRegistry();  CollectorRegistry(boolean autoDescribe); void register(Collector m); void unregister(Collector m); void clear(); Enumeration<Collector.MetricFamilySamples> metricFamilySamples(); Enumeration<Collector.MetricFamilySamples> filteredMetricFamilySamples(Set<String> includedNames); Double getSampleValue(String name); Double getSampleValue(String name, String[] labelNames, String[] labelValues); }
CollectorRegistry { public Enumeration<Collector.MetricFamilySamples> metricFamilySamples() { return new MetricFamilySamplesEnumeration(); } CollectorRegistry();  CollectorRegistry(boolean autoDescribe); void register(Collector m); void unregister(Collector m); void clear(); Enumeration<Collector.MetricFamilySamples> metricFamilySamples(); Enumeration<Collector.MetricFamilySamples> filteredMetricFamilySamples(Set<String> includedNames); Double getSampleValue(String name); Double getSampleValue(String name, String[] labelNames, String[] labelValues); static final CollectorRegistry defaultRegistry; }