Merge "[Toast] Add query_length for launcher latency logging." into tm-dev am: fe83fce489
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/18783028 Change-Id: I95de30e9971e85981814ca5298d1956870720c76 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -462,6 +462,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||||||
private LatencyType mType = LatencyType.UNKNOWN;
|
private LatencyType mType = LatencyType.UNKNOWN;
|
||||||
private int mPackageId = 0;
|
private int mPackageId = 0;
|
||||||
private long mLatencyInMillis;
|
private long mLatencyInMillis;
|
||||||
|
private int mQueryLength = -1;
|
||||||
|
|
||||||
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
|
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
@@ -492,6 +493,12 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatsLatencyLogger withQueryLength(int queryLength) {
|
||||||
|
this.mQueryLength = queryLength;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void log(EventEnum event) {
|
public void log(EventEnum event) {
|
||||||
if (IS_VERBOSE) {
|
if (IS_VERBOSE) {
|
||||||
@@ -508,7 +515,8 @@ public class StatsLogCompatManager extends StatsLogManager {
|
|||||||
mInstanceId.getId(), // instance_id
|
mInstanceId.getId(), // instance_id
|
||||||
mPackageId, // package_id
|
mPackageId, // package_id
|
||||||
mLatencyInMillis, // latency_in_millis
|
mLatencyInMillis, // latency_in_millis
|
||||||
mType.getId() //type
|
mType.getId(), //type
|
||||||
|
mQueryLength // query_length
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -771,6 +771,13 @@ public class StatsLogManager implements ResourceBasedOverride {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets query length of the event.
|
||||||
|
*/
|
||||||
|
default StatsLatencyLogger withQueryLength(int queryLength) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets packageId of log message.
|
* Sets packageId of log message.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user