@Test public void convertShouldReturnEmptyListOfGaugesOnEmptyReportEntries() { List<Gauge> gauges = ReportEntryToMetricConverter.convert(Collections.emptyList(), "path", Collections.emptyMap()); assertTrue(gauges.isEmpty()); }
public static List<Gauge> convert(List<ReportEntry> reportEntries, String path, Map<String, LabeledMetricConf> labeledMetricConfByPattern) { return convert(reportEntries, path, labeledMetricConfByPattern, CounterReportEntryMetricExtraction::extractMetricFromReportEntry, DurationReportEntryMetricExtraction::extractMetricFromReportEntry, GaugesCreation::buildGaugeWithoutLabels, GaugesCreation::buildGaugeWithLabels); }
ReportEntryToMetricConverter { public static List<Gauge> convert(List<ReportEntry> reportEntries, String path, Map<String, LabeledMetricConf> labeledMetricConfByPattern) { return convert(reportEntries, path, labeledMetricConfByPattern, CounterReportEntryMetricExtraction::extractMetricFromReportEntry, DurationReportEntryMetricExtraction::extractMetricFromReportEntry, GaugesCreation::buildGaugeWithoutLabels, GaugesCreation::buildGaugeWithLabels); } }
ReportEntryToMetricConverter { public static List<Gauge> convert(List<ReportEntry> reportEntries, String path, Map<String, LabeledMetricConf> labeledMetricConfByPattern) { return convert(reportEntries, path, labeledMetricConfByPattern, CounterReportEntryMetricExtraction::extractMetricFromReportEntry, DurationReportEntryMetricExtraction::extractMetricFromReportEntry, GaugesCreation::buildGaugeWithoutLabels, GaugesCreation::buildGaugeWithLabels); }  }
ReportEntryToMetricConverter { public static List<Gauge> convert(List<ReportEntry> reportEntries, String path, Map<String, LabeledMetricConf> labeledMetricConfByPattern) { return convert(reportEntries, path, labeledMetricConfByPattern, CounterReportEntryMetricExtraction::extractMetricFromReportEntry, DurationReportEntryMetricExtraction::extractMetricFromReportEntry, GaugesCreation::buildGaugeWithoutLabels, GaugesCreation::buildGaugeWithLabels); }  static List<Gauge> convert(List<ReportEntry> reportEntries,
                                      String path,
                                      Map<String, LabeledMetricConf> labeledMetricConfByPattern); static List<Gauge> convert(List<ReportEntry> reportEntries,
                                      String path,
                                      Map<String, LabeledMetricConf> labeledMetricConfByPattern,
                                      CounterReportEntryMetricExtraction.Extractor counterReportEntryMetricExtractor,
                                      DurationReportEntryMetricExtraction.Extractor durationReportEntryMetricExtractor,
                                      GaugesCreation.BuilderWithoutLabels gaugesBuilderWithoutLabels,
                                      GaugesCreation.BuilderWithLabels gaugesBuilderWithLabelsBuilder); static X uniqueElementOrThrow(List<E> list, Function<E, X> mapper); }
ReportEntryToMetricConverter { public static List<Gauge> convert(List<ReportEntry> reportEntries, String path, Map<String, LabeledMetricConf> labeledMetricConfByPattern) { return convert(reportEntries, path, labeledMetricConfByPattern, CounterReportEntryMetricExtraction::extractMetricFromReportEntry, DurationReportEntryMetricExtraction::extractMetricFromReportEntry, GaugesCreation::buildGaugeWithoutLabels, GaugesCreation::buildGaugeWithLabels); }  static List<Gauge> convert(List<ReportEntry> reportEntries,
                                      String path,
                                      Map<String, LabeledMetricConf> labeledMetricConfByPattern); static List<Gauge> convert(List<ReportEntry> reportEntries,
                                      String path,
                                      Map<String, LabeledMetricConf> labeledMetricConfByPattern,
                                      CounterReportEntryMetricExtraction.Extractor counterReportEntryMetricExtractor,
                                      DurationReportEntryMetricExtraction.Extractor durationReportEntryMetricExtractor,
                                      GaugesCreation.BuilderWithoutLabels gaugesBuilderWithoutLabels,
                                      GaugesCreation.BuilderWithLabels gaugesBuilderWithLabelsBuilder); static X uniqueElementOrThrow(List<E> list, Function<E, X> mapper); static final String REPORT_ENTRY_KEY_SEP; static final String METRIC_NAME_SEP; static final String LABEL_PATTERN_VALUE_TOKEN; static final String DURATION_METRIC_NAME_SUFFIX; }