Package trclib.vision
Class TrcVisionPerformanceMetrics
java.lang.Object
trclib.vision.TrcVisionPerformanceMetrics
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTrcVisionPerformanceMetrics
(String instanceName) Constructor: Create an instance of the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
logProcessingTime
(double startTime) This method is called to log the processing time of the pipeline.void
printMetrics
(TrcDbgTrace tracer) This method prints the pipeline performance metrics using the given tracer.void
reset()
This method resets the pipeline performance metrics.
-
Field Details
-
instanceName
-
sessionStartTime
private double sessionStartTime -
totalProcessedTime
private double totalProcessedTime -
totalProcessedFrames
private long totalProcessedFrames
-
-
Constructor Details
-
TrcVisionPerformanceMetrics
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
This method prints the pipeline performance metrics using the given tracer.- Parameters:
tracer
- specifies the tracer to be used to print performance info.
-