@Override public void report() { mReporter.report(); }
@Override public void stop() { if (reporter != null) { LOG.debug("Stopping..."); reporter.report(); reporter.stop(); } else { throw new IllegalStateException("Attempt to stop without preparing " + getClass().getSimpleName()); } } }
public synchronized static String report() { reporter.report(); return consoleOutput(); }
public synchronized static String report() { reporter.report(); return consoleOutput(); }
@Override public void report() { if (consoleReporter != null) { consoleReporter.report(); } }
@Override public void report() { reporter.report(); } }
@Override public void report() { mReporter.report(); } }
@Override public void report() { if (reporter != null) { reporter.report(); } }
void printReport() { m_reporter.report(); }
@Override public void report() { mReporter.report(); }
@Override public void onCompleted() { System.err.println("Finished Importing Everything!"); reporter.report(); latch.countDown(); System.exit(0); }
public synchronized static String report() { reporter.report(); return consoleOutput(); }
public synchronized static String report() { reporter.report(); return consoleOutput(); }
@Override public String toString() { ByteArrayOutputStream os = new ByteArrayOutputStream(); try { PrintStream out = new PrintStream(os, true, StandardCharsets.UTF_8.name()); ConsoleReporter.forRegistry(metrics).outputTo(out).build().report(); return os.toString(StandardCharsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }
private String getMetricReport(MetricRegistry registry) { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(outputStream); ConsoleReporter reporter = ConsoleReporter.forRegistry(registry) .outputTo(ps) .build(); reporter.report(); return new String(outputStream.toByteArray()); }
public void close() { if (reporter != null) { reporter.report(); reporter.close(); } saveMetrics(); }
@Override protected void run(Bootstrap<MacroBaseConf> bootstrap, Namespace namespace, MacroBaseConf configuration) throws Exception { configuration.loadSystemProperties(); Class c = Class.forName(configuration.getString(MacroBaseConf.PIPELINE_NAME)); Object ao = c.newInstance(); if (!(ao instanceof Pipeline)) { log.error("{} is not an instance of Pipeline! Exiting..."); return; } List<AnalysisResult> results = ((Pipeline) ao).initialize(configuration).run(); MacroBase.reporter.report(); log.info("Result: {}", results); } }
public static void reportTo(PrintStream out) { out.println("==================== BEGIN-METRIC-LOG ===================="); ConsoleReporter consoleReporter = ConsoleReporter.forRegistry(ActivityMetrics.getMetricRegistry()) .convertDurationsTo(TimeUnit.MICROSECONDS) .convertRatesTo(TimeUnit.SECONDS) .filter(MetricFilter.ALL) .outputTo(out) .build(); consoleReporter.report(); out.println("==================== END-METRIC-LOG ===================="); }
private static void reportMetrics(MetricStatisticsProvider statsProvider) { MetricRegistry metricRegistry = statsProvider.getRegistry(); ConsoleReporter.forRegistry(metricRegistry) .outputTo(System.out) .filter((name, metric) -> { if (metric instanceof Counting) { //Only report non zero metrics return ((Counting) metric).getCount() > 0; } return true; }) .build() .report(); }
private static void reportMetrics(MetricStatisticsProvider statsProvider) { MetricRegistry metricRegistry = statsProvider.getRegistry(); ConsoleReporter.forRegistry(metricRegistry) .outputTo(System.out) .filter((name, metric) -> { if (metric instanceof Counting) { //Only report non zero metrics return ((Counting) metric).getCount() > 0; } return true; }) .build() .report(); }