Log more details around conversation fetch times.
This commit is contained in:
parent
fea14218a9
commit
d9c15621f6
1 changed files with 6 additions and 2 deletions
|
@ -84,6 +84,8 @@ class ConversationDataSource extends PositionalDataSource<ConversationMessage> {
|
|||
}
|
||||
}
|
||||
|
||||
long mentionStart = System.currentTimeMillis();
|
||||
|
||||
mentionHelper.fetchMentions(context);
|
||||
|
||||
if (!isInvalid()) {
|
||||
|
@ -94,7 +96,7 @@ class ConversationDataSource extends PositionalDataSource<ConversationMessage> {
|
|||
.toList();
|
||||
|
||||
callback.onResult(items, params.requestedStartPosition, result.getTotal());
|
||||
Log.d(TAG, "[Initial Load] " + (System.currentTimeMillis() - start) + " ms | thread: " + threadId + ", start: " + params.requestedStartPosition + ", requestedSize: " + params.requestedLoadSize + ", actualSize: " + result.getItems().size() + ", totalCount: " + result.getTotal());
|
||||
Log.d(TAG, "[Initial Load] " + (System.currentTimeMillis() - start) + " ms (mentions: " + (System.currentTimeMillis() - mentionStart) + " ms) | thread: " + threadId + ", start: " + params.requestedStartPosition + ", requestedSize: " + params.requestedLoadSize + ", actualSize: " + result.getItems().size() + ", totalCount: " + result.getTotal());
|
||||
} else {
|
||||
Log.d(TAG, "[Initial Load] " + (System.currentTimeMillis() - start) + " ms | thread: " + threadId + ", start: " + params.requestedStartPosition + ", requestedSize: " + params.requestedLoadSize + ", totalCount: " + totalCount + " -- invalidated");
|
||||
}
|
||||
|
@ -116,6 +118,8 @@ class ConversationDataSource extends PositionalDataSource<ConversationMessage> {
|
|||
}
|
||||
}
|
||||
|
||||
long mentionStart = System.currentTimeMillis();
|
||||
|
||||
mentionHelper.fetchMentions(context);
|
||||
|
||||
List<ConversationMessage> items = Stream.of(records)
|
||||
|
@ -123,7 +127,7 @@ class ConversationDataSource extends PositionalDataSource<ConversationMessage> {
|
|||
.toList();
|
||||
callback.onResult(items);
|
||||
|
||||
Log.d(TAG, "[Update] " + (System.currentTimeMillis() - start) + " ms | thread: " + threadId + ", start: " + params.startPosition + ", size: " + params.loadSize + (isInvalid() ? " -- invalidated" : ""));
|
||||
Log.d(TAG, "[Update] " + (System.currentTimeMillis() - start) + " ms (mentions: " + (System.currentTimeMillis() - mentionStart) + " ms) | thread: " + threadId + ", start: " + params.startPosition + ", size: " + params.loadSize + (isInvalid() ? " -- invalidated" : ""));
|
||||
}
|
||||
|
||||
private static class MentionHelper {
|
||||
|
|
Loading…
Add table
Reference in a new issue