Interface PerfStatsReporter

All Known Implementing Classes:
SimplePerfStatsReporter

public interface PerfStatsReporter
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called by Robolectric one time at the end of the test session, typically in a JVM shutdown hook.
    void
    report(Metadata metadata, Collection<Metric> metrics)
    Report performance stats.
  • Method Details

    • report

      void report(Metadata metadata, Collection<Metric> metrics)
      Report performance stats.

      The Robolectric test runner will call this method one or more times with a set of metrics. Implementations should store the data in a way that can be accessed by finalReport().

      Parameters:
      metadata - metadata about this set of metrics.
      metrics - the metrics.
    • finalReport

      default void finalReport()
      Called by Robolectric one time at the end of the test session, typically in a JVM shutdown hook. Implementations can use this to report the metrics they have stored from previous calls to report(Metadata, Collection).