Merge changes from topic "latency" into pi-dev
* changes: use the dedicated latency field in logmaker add reserved latency field
This commit is contained in:
committed by
Android (Google) Code Review
commit
02fea57dc0
@@ -103,7 +103,7 @@ public class LogMaker {
|
||||
* @hide // TODO Expose in the future? Too late for O.
|
||||
*/
|
||||
public LogMaker setLatency(long milliseconds) {
|
||||
entries.put(MetricsEvent.NOTIFICATION_SINCE_CREATE_MILLIS, milliseconds);
|
||||
entries.put(MetricsEvent.RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS, milliseconds);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ package com.android.systemui.statusbar.policy;
|
||||
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_NUM_STATUS_ICONS;
|
||||
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_STATUS_ICONS;
|
||||
import static com.android.internal.logging.nano.MetricsProto.MetricsEvent
|
||||
.NOTIFICATION_SINCE_CREATE_MILLIS;
|
||||
.RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
@@ -119,9 +119,9 @@ public class IconLoggerImplTest extends SysuiTestCase {
|
||||
|
||||
verify(mMetricsLogger).write(argThat(maker -> {
|
||||
if (IconLoggerImpl.MIN_LOG_INTERVAL >
|
||||
(long) maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS)) {
|
||||
(long) maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS)) {
|
||||
Log.e("IconLoggerImplTest", "Invalid latency "
|
||||
+ maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS));
|
||||
+ maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS));
|
||||
return false;
|
||||
}
|
||||
if (1 != (int) maker.getTaggedData(FIELD_NUM_STATUS_ICONS)) {
|
||||
|
||||
@@ -5503,6 +5503,10 @@ message MetricsEvent {
|
||||
// OS: P
|
||||
ACTION_MANAGE_NOTIFICATIONS = 1358;
|
||||
|
||||
// This value should never appear in log outputs - it is reserved for
|
||||
// internal platform metrics use.
|
||||
RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS = 1359;
|
||||
|
||||
// ---- End P Constants, all P constants go above this line ----
|
||||
// Add new aosp constants above this line.
|
||||
// END OF AOSP CONSTANTS
|
||||
|
||||
Reference in New Issue
Block a user