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