Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

log time taken to fetch memories

ashilkna7e6c34b13bd
diff --git a/lib/services/memories_service.dart b/lib/services/memories_service.dart
index 2bfefcb2f8..6461131289 100644
--- a/lib/services/memories_service.dart
+++ b/lib/services/memories_service.dart
@@ -85,6 +85,7 @@ class MemoriesService extends ChangeNotifier {
}
Future<List<Memory>> _fetchMemories() async {
+ final stopWatch = Stopwatch()..start();
_logger.info("Fetching memories");
final presentTime = DateTime.now();
final present = presentTime.subtract(
@@ -121,6 +122,8 @@ class MemoriesService extends ChangeNotifier {
}
}
_cachedMemories = memories;
+ stopWatch.stop();
+ _logger.info("Fetched memories, duration: ${stopWatch.elapsed}");
return _cachedMemories!;
}