Package trclib.vision

Class TrcVisionPerformanceMetrics

java.lang.Object
trclib.vision.TrcVisionPerformanceMetrics

public class TrcVisionPerformanceMetrics extends Object
This class implements Performance Metrics for Vision. It keeps track of the average time for vision to process a frame as well as the process frame rate.
  • Field Details

    • instanceName

      private final String instanceName
    • sessionStartTime

      private double sessionStartTime
    • totalProcessedTime

      private double totalProcessedTime
    • totalProcessedFrames

      private long totalProcessedFrames
  • Constructor Details

    • TrcVisionPerformanceMetrics

      public TrcVisionPerformanceMetrics(String instanceName)
      Constructor: Create an instance of the object.
      Parameters:
      instanceName - specifies the instance name.
  • Method Details

    • reset

      public void reset()
      This method resets the pipeline performance metrics. It is typically called before enabling the pipeline.
    • logProcessingTime

      public void logProcessingTime(double startTime)
      This method is called to log the processing time of the pipeline.
      Parameters:
      startTime - specifies the timestamp when the processing starts.
    • printMetrics

      public void printMetrics(TrcDbgTrace tracer)
      This method prints the pipeline performance metrics using the given tracer.
      Parameters:
      tracer - specifies the tracer to be used to print performance info.