Package org.robolectric.util
Class PerfStatsPublisher
java.lang.Object
org.robolectric.util.PerfStatsPublisher
Helper class used by the test runner to manage PerfStatsReporters and publish data
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddReporters(List<PerfStatsReporter> reporters) voidRegister a JVM shutdown hook that calls PerfStatsReporter#finalReport on all reportersvoiddoFinalReportOnShutdown(Runnable preFinalReportTask) A variant ofdoFinalReportOnShutdown()that allows running a task before finalReport is calledstatic PerfStatsPublishervoidreport(PerfStatsCollector collector) Report the currently stored metrics to the registered PerfStatsReporter.
-
Method Details
-
getInstance
-
addReporters
-
doFinalReportOnShutdown
public void doFinalReportOnShutdown()Register a JVM shutdown hook that calls PerfStatsReporter#finalReport on all reporters -
doFinalReportOnShutdown
A variant ofdoFinalReportOnShutdown()that allows running a task before finalReport is called -
report
Report the currently stored metrics to the registered PerfStatsReporter.Normally this is called by test runner at end of each test.
-