Add traces to BackGestureTFClassifier#loadVocab
This seems to take a lot of time, and we think it happens more often than needed. With those traces we will be able to easily spot it in perfetto recordings. Bug: 197515205 Test: Manual Change-Id: Iaa3d14ebf789d7d2082de121e58ca443fc4122c1
This commit is contained in:
@@ -36,6 +36,7 @@ import android.os.Looper;
|
||||
import android.os.RemoteException;
|
||||
import android.os.SystemClock;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import android.provider.DeviceConfig;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
@@ -576,7 +577,9 @@ public class EdgeBackGestureHandler extends CurrentUserTracker
|
||||
mMLModelThreshold = DeviceConfig.getFloat(DeviceConfig.NAMESPACE_SYSTEMUI,
|
||||
SystemUiDeviceConfigFlags.BACK_GESTURE_ML_MODEL_THRESHOLD, 0.9f);
|
||||
if (mBackGestureTfClassifierProvider.isActive()) {
|
||||
Trace.beginSection("EdgeBackGestureHandler#loadVocab");
|
||||
mVocab = mBackGestureTfClassifierProvider.loadVocab(mContext.getAssets());
|
||||
Trace.endSection();
|
||||
mUseMLModel = true;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user