mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 16:49:40 +01:00
Add debug logging for attachment restore speeds.
This commit is contained in:
committed by
Jeffrey Starke
parent
eb4abf2a9e
commit
d636ef8ec9
@@ -516,4 +516,21 @@ public final class SignalLocalMetrics {
|
||||
LocalMetrics.getInstance().end(NAME + id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks how long it took to restore an attachment.
|
||||
*/
|
||||
public static final class ArchiveAttachmentRestore {
|
||||
private static final String NAME = "archive-attachment-restore";
|
||||
|
||||
/** When the attachment begins uploading. */
|
||||
public static void start(AttachmentId id) {
|
||||
LocalMetrics.getInstance().start(NAME, NAME + id);
|
||||
}
|
||||
|
||||
/** When the attachment finishes uploading. */
|
||||
public static void end(AttachmentId id) {
|
||||
LocalMetrics.getInstance().end(NAME + id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user