Making it easier to investigate jank and latency traces
Shortening Cuj<> to a more meaningful J<> for jank. Using L<> for latency will make it easier to search for Latency traces in trace tools. Using getNameOfAction() for latencies in all places will simplify finding latencies in code. Test: manual Bug: 177018359 Change-Id: Ie3114e7d7f97e7950af19a014d06f5c632a607c3
This commit is contained in:
@@ -463,7 +463,7 @@ public class InteractionJankMonitor {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return "Cuj<" + getNameOfCuj(mCujType) + ">";
|
||||
return "J<" + getNameOfCuj(mCujType) + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,18 +91,6 @@ public class LatencyTracker {
|
||||
*/
|
||||
public static final int ACTION_START_RECENTS_ANIMATION = 8;
|
||||
|
||||
private static final String[] NAMES = new String[]{
|
||||
"expand panel",
|
||||
"toggle recents",
|
||||
"fingerprint wake-and-unlock",
|
||||
"check credential",
|
||||
"check credential unlocked",
|
||||
"turn on screen",
|
||||
"rotate the screen",
|
||||
"face wake-and-unlock",
|
||||
"start recents-animation",
|
||||
};
|
||||
|
||||
private static final int[] STATSD_ACTION = new int[]{
|
||||
FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_EXPAND_PANEL,
|
||||
FrameworkStatsLog.UIACTION_LATENCY_REPORTED__ACTION__ACTION_TOGGLE_RECENTS,
|
||||
@@ -185,6 +173,10 @@ public class LatencyTracker {
|
||||
}
|
||||
}
|
||||
|
||||
private String getTraceNameOfAcion(int action) {
|
||||
return "L<" + getNameOfAction(action) + ">";
|
||||
}
|
||||
|
||||
public static boolean isEnabled(Context ctx) {
|
||||
return getInstance(ctx).isEnabled();
|
||||
}
|
||||
@@ -202,7 +194,7 @@ public class LatencyTracker {
|
||||
if (!isEnabled()) {
|
||||
return;
|
||||
}
|
||||
Trace.asyncTraceBegin(Trace.TRACE_TAG_APP, NAMES[action], 0);
|
||||
Trace.asyncTraceBegin(Trace.TRACE_TAG_APP, getTraceNameOfAcion(action), 0);
|
||||
mStartRtc.put(action, SystemClock.elapsedRealtime());
|
||||
}
|
||||
|
||||
@@ -221,7 +213,7 @@ public class LatencyTracker {
|
||||
return;
|
||||
}
|
||||
mStartRtc.delete(action);
|
||||
Trace.asyncTraceEnd(Trace.TRACE_TAG_APP, NAMES[action], 0);
|
||||
Trace.asyncTraceEnd(Trace.TRACE_TAG_APP, getTraceNameOfAcion(action), 0);
|
||||
logAction(action, (int) (endRtc - startRtc));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user