Skip to content

Commit 04e199b

Browse files
committed
dev demo: print instead of debugLog for stopwatching
1 parent 42e63db commit 04e199b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/model/store.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class PerAccountStore extends ChangeNotifier {
312312
final stopwatch = Stopwatch()..start();
313313
unreads.handleMessageEvent(event);
314314
final t = (stopwatch..stop()).elapsed;
315-
assert(debugLog('handleMessageEvent time: ${t.inMilliseconds}ms'));
315+
print('handleMessageEvent time: ${t.inMilliseconds}ms');
316316
} else if (event is UpdateMessageEvent) {
317317
assert(debugLog("server event: update_message ${event.messageId}"));
318318
for (final view in _messageListViews) {
@@ -321,14 +321,14 @@ class PerAccountStore extends ChangeNotifier {
321321
final stopwatch = Stopwatch()..start();
322322
unreads.handleUpdateMessageEvent(event);
323323
final t = (stopwatch..stop()).elapsed;
324-
assert(debugLog('handleUpdateMessageEvent time: ${t.inMilliseconds}ms'));
324+
print('handleUpdateMessageEvent time: ${t.inMilliseconds}ms');
325325
} else if (event is DeleteMessageEvent) {
326326
assert(debugLog("server event: delete_message ${event.messageIds}"));
327327
// TODO handle in message lists
328328
final stopwatch = Stopwatch()..start();
329329
unreads.handleDeleteMessageEvent(event);
330330
final t = (stopwatch..stop()).elapsed;
331-
assert(debugLog('handleDeleteMessageEvent time: ${t.inMilliseconds}ms'));
331+
print('handleDeleteMessageEvent time: ${t.inMilliseconds}ms');
332332
} else if (event is UpdateMessageFlagsEvent) {
333333
assert(debugLog("server event: update_message_flags/${event.op} ${event.flag.toJson()}"));
334334
for (final view in _messageListViews) {
@@ -337,7 +337,7 @@ class PerAccountStore extends ChangeNotifier {
337337
final stopwatch = Stopwatch()..start();
338338
unreads.handleUpdateMessageFlagsEvent(event);
339339
final t = (stopwatch..stop()).elapsed;
340-
assert(debugLog('handleUpdateMessageFlagsEvent time: ${t.inMilliseconds}ms'));
340+
print('handleUpdateMessageFlagsEvent time: ${t.inMilliseconds}ms');
341341
} else if (event is ReactionEvent) {
342342
assert(debugLog("server event: reaction/${event.op}"));
343343
for (final view in _messageListViews) {

lib/model/unreads.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Unreads extends ChangeNotifier {
7171
);
7272

7373
final t = (stopwatch..stop()).elapsed;
74-
assert(debugLog('Unreads constructor time: ${t.inMilliseconds}ms'));
74+
print('Unreads constructor time: ${t.inMilliseconds}ms (`count` is ${initial.count})');
7575

7676
return result;
7777
}

0 commit comments

Comments
 (0)