mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "[Toast] Add query_length for launcher latency logging." into tm-dev
This commit is contained in:
@@ -462,6 +462,7 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
private LatencyType mType = LatencyType.UNKNOWN;
|
||||
private int mPackageId = 0;
|
||||
private long mLatencyInMillis;
|
||||
private int mQueryLength = -1;
|
||||
|
||||
StatsCompatLatencyLogger(Context context, ActivityContext activityContext) {
|
||||
mContext = context;
|
||||
@@ -492,6 +493,12 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StatsLatencyLogger withQueryLength(int queryLength) {
|
||||
this.mQueryLength = queryLength;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void log(EventEnum event) {
|
||||
if (IS_VERBOSE) {
|
||||
@@ -508,7 +515,8 @@ public class StatsLogCompatManager extends StatsLogManager {
|
||||
mInstanceId.getId(), // instance_id
|
||||
mPackageId, // package_id
|
||||
mLatencyInMillis, // latency_in_millis
|
||||
mType.getId() //type
|
||||
mType.getId(), //type
|
||||
mQueryLength // query_length
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,6 +771,13 @@ public class StatsLogManager implements ResourceBasedOverride {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets query length of the event.
|
||||
*/
|
||||
default StatsLatencyLogger withQueryLength(int queryLength) {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets packageId of log message.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user