Skip to content

Commit 7073a6e

Browse files
committed
api: Crudely log how long the initial fetch takes
1 parent 7d6b72a commit 7073a6e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/store.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ class PerAccountStore extends ChangeNotifier {
88
// Load the user's data from storage. (Once we have such a thing.)
99
static Future<PerAccountStore> load() async {
1010
const account = _fixtureAccount;
11+
12+
final stopwatch = Stopwatch()..start();
1113
final initialSnapshot = await registerQueue(account); // TODO retry
14+
final t = (stopwatch..stop()).elapsed;
15+
// TODO log the time better
16+
if (kDebugMode) print("initial fetch time: ${t.inMilliseconds}ms");
17+
1218
return PerAccountStore(account: account, initialSnapshot: initialSnapshot);
1319
}
1420

0 commit comments

Comments
 (0)