ente/lib/services/object_detection/models/stats.dart
2023-05-11 12:35:07 +05:30

28 lines
740 B
Dart

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