ente/lib/services/object_detection/models/stats.dart

28 lines
716 B
Dart
Raw Normal View History

2023-02-08 13:36:40 +00:00
/// Bundles different elapsed times
class Stats {
/// Total time taken in the isolate where the inference runs
int totalPredictTime;
/// [totalPredictTime] + communication overhead time
/// between main isolate and another isolate
int totalElapsedTime;
/// Time for which inference runs
int inferenceTime;
/// Time taken to pre-process the image
int preProcessingTime;
Stats(
this.totalPredictTime,
this.totalElapsedTime,
this.inferenceTime,
this.preProcessingTime,
);
@override
String toString() {
return 'Stats{totalPredictTime: $totalPredictTime, totalElapsedTime: $totalElapsedTime, inferenceTime: $inferenceTime, preProcessingTime: $preProcessingTime}';
}
}