mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-27 13:13:43 +00:00
Add notification profile size to local metrics.
This commit is contained in:
committed by
Greyson Parrelli
parent
1a531548e8
commit
2ced30b557
@@ -262,6 +262,7 @@ private fun InsightsRow(insights: StorageInsights) {
|
||||
ManifestItemRow("Total Call Link Record Size", insights.totalCallLinkSize.toUnitString())
|
||||
ManifestItemRow("Total Distribution List Record Size", insights.totalDistributionListSize.toUnitString())
|
||||
ManifestItemRow("Total Chat Folder Record Size", insights.totalChatFolderSize.toUnitString())
|
||||
ManifestItemRow("Total Notification Profile Record Size", insights.totalNotificationProfileSize.toUnitString())
|
||||
ManifestItemRow("Total Unknown Record Size", insights.totalUnknownSize.toUnitString())
|
||||
|
||||
Spacer(Modifier.height(16.dp))
|
||||
@@ -273,7 +274,8 @@ private fun InsightsRow(insights: StorageInsights) {
|
||||
insights.totalAccountRecordSize,
|
||||
insights.totalCallLinkSize,
|
||||
insights.totalDistributionListSize,
|
||||
insights.totalChatFolderSize
|
||||
insights.totalChatFolderSize,
|
||||
insights.totalNotificationProfileSize
|
||||
).sumOf { it.bytes } != insights.totalRecordSize.bytes
|
||||
) {
|
||||
Text("Mismatch! Sum of record sizes does not match our total record size!")
|
||||
|
||||
@@ -87,6 +87,7 @@ class InternalStorageServicePlaygroundViewModel : ViewModel() {
|
||||
totalCallLinkSize = records.filter { it.proto.callLink != null }.sumOf { it.sizeInBytes() }.bytes,
|
||||
totalDistributionListSize = records.filter { it.proto.storyDistributionList != null }.sumOf { it.sizeInBytes() }.bytes,
|
||||
totalChatFolderSize = records.filter { it.proto.chatFolder != null }.sumOf { it.sizeInBytes() }.bytes,
|
||||
totalNotificationProfileSize = records.filter { it.proto.notificationProfile != null }.sumOf { it.sizeInBytes() }.bytes,
|
||||
totalUnknownSize = records.filter { it.isUnknown }.sumOf { it.sizeInBytes() }.bytes
|
||||
)
|
||||
|
||||
@@ -113,6 +114,7 @@ class InternalStorageServicePlaygroundViewModel : ViewModel() {
|
||||
val totalCallLinkSize: ByteSize = 0.bytes,
|
||||
val totalDistributionListSize: ByteSize = 0.bytes,
|
||||
val totalChatFolderSize: ByteSize = 0.bytes,
|
||||
val totalNotificationProfileSize: ByteSize = 0.bytes,
|
||||
val totalUnknownSize: ByteSize = 0.bytes
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user