test_class.declarator: DURATION_UNIT = TimeUnit.MICROSECONDS
test_class.modifier: private static final
test_class.original_string: private static final TimeUnit DURATION_UNIT = TimeUnit.MICROSECONDS;
test_class.type: TimeUnit
test_class.var_name: DURATION_UNIT
test_class.declarator: DURATION_FACTOR = 1.0 / DURATION_UNIT.toNanos(1)
test_class.modifier: private static final
test_class.original_string: private static final double DURATION_FACTOR = 1.0 / DURATION_UNIT.toNanos(1);
test_class.type: double
test_class.var_name: DURATION_FACTOR
test_class.declarator: logger
test_class.modifier: private
test_class.original_string: private Logger logger;
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: reporter
test_class.modifier: private
test_class.original_string: private SortedTableLogReporter reporter;
test_class.type: SortedTableLogReporter
test_class.var_name: reporter
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/metrics/SortedTableLogReporterTest.java
test_class.identifier: SortedTableLogReporterTest
test_class.superclass: extends MetricsReporterTestHelper
test_case.body: @Test
  	public void reportsTimerValues() throws Exception {
  
  		reporter.reportMetrics(map(),
  				map(),
  				map(),
  				map(),
  				map(name("timer1").build(), timer(400)).add(name("timer2").build(), timer(200)).add(name("timer3").build(), timer(300)));
  
  		verify(logger).info("Metrics ========================================================================\n" +
  				"\n" +
  				"-- Timers ----------------------------------------------------------------------\n" +
  				"name   | count     | mean      | min       | max       | stddev    | p50       | p75       | p95       | p98       | p99       | p999      | mean_rate | m1_rate   | m5_rate   | m15_rate  | rate_unit     | duration_unit\n" +
  				"timer1 |         1 |      0.40 |      0.40 |      0.20 |      0.50 |      0.60 |      0.70 |      0.80 |      0.90 |      1.00 |      1.10 |      2.00 |      3.00 |      4.00 |      5.00 | second        | microseconds\n" +
  				"timer3 |         1 |      0.30 |      0.40 |      0.20 |      0.50 |      0.60 |      0.70 |      0.80 |      0.90 |      1.00 |      1.10 |      2.00 |      3.00 |      4.00 |      5.00 | second        | microseconds\n" +
  				"timer2 |         1 |      0.20 |      0.40 |      0.20 |      0.50 |      0.60 |      0.70 |      0.80 |      0.90 |      1.00 |      1.10 |      2.00 |      3.00 |      4.00 |      5.00 | second        | microseconds\n" +
  				"\n" +
  				"\n");
  	}
test_case.class_method_signature: SortedTableLogReporterTest.reportsTimerValues()
test_case.full_signature: @Test public void reportsTimerValues()
test_case.identifier: reportsTimerValues
test_case.invocations: reportMetrics map map map map add add map build name timer build name timer build name timer info verify
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void reportsTimerValues()
focal_class.declarator: CONSOLE_WIDTH = 80
focal_class.modifier: private static final
focal_class.original_string: private static final int CONSOLE_WIDTH = 80;
focal_class.type: int
focal_class.var_name: CONSOLE_WIDTH
focal_class.declarator: reportingTimeMetricName = name("reporting_time").tag("reporter", "log").build()
focal_class.modifier: private static final
focal_class.original_string: private static final MetricName reportingTimeMetricName = name("reporting_time").tag("reporter", "log").build();
focal_class.type: MetricName
focal_class.var_name: reportingTimeMetricName
focal_class.declarator: locale
focal_class.modifier: private final
focal_class.original_string: private final Locale locale;
focal_class.type: Locale
focal_class.var_name: locale
focal_class.declarator: log
focal_class.modifier: private final
focal_class.original_string: private final Logger log;
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/metrics/SortedTableLogReporter.java
focal_class.identifier: SortedTableLogReporter
focal_class.class_method_signature: SortedTableLogReporter.forRegistry(Metric2Registry registry)
focal_class.full_signature: public static Builder forRegistry(Metric2Registry registry)
focal_class.identifier: forRegistry
focal_class.modifiers: public static
focal_class.parameters: (Metric2Registry registry)
focal_class.return: Builder
focal_class.signature: Builder forRegistry(Metric2Registry registry)
focal_class.class_method_signature: SortedTableLogReporter.SortedTableLogReporter(Builder builder)
focal_class.full_signature: private  SortedTableLogReporter(Builder builder)
focal_class.identifier: SortedTableLogReporter
focal_class.modifiers: private
focal_class.parameters: (Builder builder)
focal_class.signature:  SortedTableLogReporter(Builder builder)
focal_class.class_method_signature: SortedTableLogReporter.reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_class.full_signature: @Override public void reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_class.identifier: reportMetrics
focal_class.modifiers: @Override public
focal_class.parameters: (Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_class.return: void
focal_class.signature: void reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_class.class_method_signature: SortedTableLogReporter.logGauges(Map<MetricName, Gauge> gauges, StringBuilder sb)
focal_class.full_signature: private void logGauges(Map<MetricName, Gauge> gauges, StringBuilder sb)
focal_class.identifier: logGauges
focal_class.modifiers: private
focal_class.parameters: (Map<MetricName, Gauge> gauges, StringBuilder sb)
focal_class.return: void
focal_class.signature: void logGauges(Map<MetricName, Gauge> gauges, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.logCounters(Map<MetricName, Counter> counters, StringBuilder sb)
focal_class.full_signature: private void logCounters(Map<MetricName, Counter> counters, StringBuilder sb)
focal_class.identifier: logCounters
focal_class.modifiers: private
focal_class.parameters: (Map<MetricName, Counter> counters, StringBuilder sb)
focal_class.return: void
focal_class.signature: void logCounters(Map<MetricName, Counter> counters, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.logHistograms(Map<MetricName, Histogram> histograms, StringBuilder sb)
focal_class.full_signature: private void logHistograms(Map<MetricName, Histogram> histograms, StringBuilder sb)
focal_class.identifier: logHistograms
focal_class.modifiers: private
focal_class.parameters: (Map<MetricName, Histogram> histograms, StringBuilder sb)
focal_class.return: void
focal_class.signature: void logHistograms(Map<MetricName, Histogram> histograms, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.logMeters(Map<MetricName, Meter> meters, StringBuilder sb)
focal_class.full_signature: private void logMeters(Map<MetricName, Meter> meters, StringBuilder sb)
focal_class.identifier: logMeters
focal_class.modifiers: private
focal_class.parameters: (Map<MetricName, Meter> meters, StringBuilder sb)
focal_class.return: void
focal_class.signature: void logMeters(Map<MetricName, Meter> meters, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.logTimers(Map<MetricName, Timer> timers, StringBuilder sb)
focal_class.full_signature: private void logTimers(Map<MetricName, Timer> timers, StringBuilder sb)
focal_class.identifier: logTimers
focal_class.modifiers: private
focal_class.parameters: (Map<MetricName, Timer> timers, StringBuilder sb)
focal_class.return: void
focal_class.signature: void logTimers(Map<MetricName, Timer> timers, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.sortByValue(Map<K, V> map, final Comparator<V> valueComparator)
focal_class.full_signature: private static Map<K, V> sortByValue(Map<K, V> map, final Comparator<V> valueComparator)
focal_class.identifier: sortByValue
focal_class.modifiers: private static
focal_class.parameters: (Map<K, V> map, final Comparator<V> valueComparator)
focal_class.return: Map<K, V>
focal_class.signature: Map<K, V> sortByValue(Map<K, V> map, final Comparator<V> valueComparator)
focal_class.class_method_signature: SortedTableLogReporter.getMaxLengthOfKeys(Map<MetricName, ?> map)
focal_class.full_signature: private static int getMaxLengthOfKeys(Map<MetricName, ?> map)
focal_class.identifier: getMaxLengthOfKeys
focal_class.modifiers: private static
focal_class.parameters: (Map<MetricName, ?> map)
focal_class.return: int
focal_class.signature: int getMaxLengthOfKeys(Map<MetricName, ?> map)
focal_class.class_method_signature: SortedTableLogReporter.printGauge(String name, Gauge gauge, int maxNameLength, StringBuilder sb)
focal_class.full_signature: private void printGauge(String name, Gauge gauge, int maxNameLength, StringBuilder sb)
focal_class.identifier: printGauge
focal_class.modifiers: private
focal_class.parameters: (String name, Gauge gauge, int maxNameLength, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printGauge(String name, Gauge gauge, int maxNameLength, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printCounter(String name, Counter counter, int maxNameLength, StringBuilder sb)
focal_class.full_signature: private void printCounter(String name, Counter counter, int maxNameLength, StringBuilder sb)
focal_class.identifier: printCounter
focal_class.modifiers: private
focal_class.parameters: (String name, Counter counter, int maxNameLength, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printCounter(String name, Counter counter, int maxNameLength, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printMeter(String name, Meter meter, int maxNameLength, StringBuilder sb)
focal_class.full_signature: private void printMeter(String name, Meter meter, int maxNameLength, StringBuilder sb)
focal_class.identifier: printMeter
focal_class.modifiers: private
focal_class.parameters: (String name, Meter meter, int maxNameLength, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printMeter(String name, Meter meter, int maxNameLength, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printMetered(Metered metered, StringBuilder sb)
focal_class.full_signature: private void printMetered(Metered metered, StringBuilder sb)
focal_class.identifier: printMetered
focal_class.modifiers: private
focal_class.parameters: (Metered metered, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printMetered(Metered metered, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printHistogram(String name, Histogram histogram, int maxNameLength, StringBuilder sb)
focal_class.full_signature: private void printHistogram(String name, Histogram histogram, int maxNameLength, StringBuilder sb)
focal_class.identifier: printHistogram
focal_class.modifiers: private
focal_class.parameters: (String name, Histogram histogram, int maxNameLength, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printHistogram(String name, Histogram histogram, int maxNameLength, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printTimerSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.full_signature: private void printTimerSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.identifier: printTimerSnapshot
focal_class.modifiers: private
focal_class.parameters: (Snapshot snapshot, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printTimerSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printHistogramSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.full_signature: private void printHistogramSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.identifier: printHistogramSnapshot
focal_class.modifiers: private
focal_class.parameters: (Snapshot snapshot, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printHistogramSnapshot(Snapshot snapshot, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printTimer(String name, Timer timer, int maxNameLength, StringBuilder sb)
focal_class.full_signature: private void printTimer(String name, Timer timer, int maxNameLength, StringBuilder sb)
focal_class.identifier: printTimer
focal_class.modifiers: private
focal_class.parameters: (String name, Timer timer, int maxNameLength, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printTimer(String name, Timer timer, int maxNameLength, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.formatCount(long count)
focal_class.full_signature: private String formatCount(long count)
focal_class.identifier: formatCount
focal_class.modifiers: private
focal_class.parameters: (long count)
focal_class.return: String
focal_class.signature: String formatCount(long count)
focal_class.class_method_signature: SortedTableLogReporter.printDouble(double d, StringBuilder sb)
focal_class.full_signature: public void printDouble(double d, StringBuilder sb)
focal_class.identifier: printDouble
focal_class.modifiers: public
focal_class.parameters: (double d, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printDouble(double d, StringBuilder sb)
focal_class.class_method_signature: SortedTableLogReporter.printWithBanner(String s, char c, StringBuilder sb)
focal_class.full_signature: private void printWithBanner(String s, char c, StringBuilder sb)
focal_class.identifier: printWithBanner
focal_class.modifiers: private
focal_class.parameters: (String s, char c, StringBuilder sb)
focal_class.return: void
focal_class.signature: void printWithBanner(String s, char c, StringBuilder sb)
focal_class.superclass: extends ScheduledMetrics2Reporter
focal_method.body: @Override
  	public void reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers) {
  
  		final Timer.Context time = Stagemonitor.getMetric2Registry().timer(reportingTimeMetricName).time();
  
  		StringBuilder sb = new StringBuilder(1000);
  		printWithBanner("Metrics", '=', sb);
  		sb.append('\n');
  
  		try {
  			logGauges(gauges, sb);
  			logCounters(counters, sb);
  			logHistograms(histograms, sb);
  			logMeters(meters, sb);
  			logTimers(timers, sb);
  			sb.append('\n');
  		} catch (Exception e) {
  			log.error(e.getMessage(), e);
  		} finally {
  			log.info(sb.toString());
  			time.stop();
  		}
  	}
focal_method.class_method_signature: SortedTableLogReporter.reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_method.full_signature: @Override public void reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_method.identifier: reportMetrics
focal_method.invocations: time timer getMetric2Registry printWithBanner append logGauges logCounters logHistograms logMeters logTimers append error getMessage info toString stop
focal_method.modifiers: @Override public
focal_method.parameters: (Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)
focal_method.return: void
focal_method.signature: void reportMetrics(Map<MetricName, Gauge> gauges,
  							  Map<MetricName, Counter> counters,
  							  Map<MetricName, Histogram> histograms,
  							  Map<MetricName, Meter> meters,
  							  Map<MetricName, Timer> timers)