Class CentralMetricsCollector

java.lang.Object
com.assemblyrobot.simulator.core.metrics.CentralMetricsCollector

public class CentralMetricsCollector
extends java.lang.Object
Centralised metrics collector. Used for keeping track of all metrics collectors in the simulator.
  • Constructor Summary

    Constructors
    Constructor Description
    CentralMetricsCollector()  
  • Method Summary

    Modifier and Type Method Description
    void dump()
    Dumps all current metrics collectors.
    void registerMetricsCollector​(@NonNull java.lang.String hostName, @NonNull MetricsCollector collector)
    Registers a metrics collector.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CentralMetricsCollector

      public CentralMetricsCollector()
  • Method Details

    • registerMetricsCollector

      public void registerMetricsCollector​(@NonNull @NonNull java.lang.String hostName, @NonNull @NonNull MetricsCollector collector) throws DuplicateMetricsCollectorRegistrationError
      Registers a metrics collector. This method is automatically called by the default constructor of MetricsCollector.

      Note: With respect to the above, do not call this method manually. It is public strictly for practical reasons.

      Parameters:
      hostName - Name of the host for this metrics collector; needs to be a unique identifier.
      collector - MetricsCollector
      Throws:
      DuplicateMetricsCollectorRegistrationError - If a metrics collector for this host class has already been registered.
    • dump

      public void dump()
      Dumps all current metrics collectors. Used for resets between simulator runs.