public class DefaultAndroidProfiler extends java.lang.Object implements AppProfiler
This profiler uses the Android Trace class which is only supported on Android SDK rev 18 and higher (ver 4.3 and higher). If the device is running a version less than rev 18, the logging will be skipped.
In the MainActivity class, add the following:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
app.setAppProfiler(new DefaultAndroidProfiler());
}
Start the Android systrace utility and run the application to
see the detailed timings of the application.Constructor and Description |
---|
DefaultAndroidProfiler() |
Modifier and Type | Method and Description |
---|---|
void |
appStep(AppStep appStep)
Called at the beginning of the specified AppStep.
|
void |
appSubStep(java.lang.String... additionalInfo)
Called as a substep of the previous AppStep
|
void |
spStep(SpStep step,
java.lang.String... additionalInfo)
Called at the beginning of the specified SpStep (SceneProcessor step).
|
void |
vpStep(VpStep vpStep,
ViewPort vp,
RenderQueue.Bucket bucket)
Called at the beginning of the specified VpStep during
the rendering of the specified ViewPort.
|
public void appStep(AppStep appStep)
AppProfiler
appStep
in interface AppProfiler
appStep
- the application-level step that's about to beginpublic void appSubStep(java.lang.String... additionalInfo)
AppProfiler
appSubStep
in interface AppProfiler
additionalInfo
- information about the substeppublic void vpStep(VpStep vpStep, ViewPort vp, RenderQueue.Bucket bucket)
AppProfiler
vpStep
in interface AppProfiler
vpStep
- the ViewPort-level step that's about to beginvp
- which ViewPort is being processedbucket
- which Bucket is being processedpublic void spStep(SpStep step, java.lang.String... additionalInfo)
AppProfiler
spStep
in interface AppProfiler
step
- the SceneProcessor step that's about to beginadditionalInfo
- information about the SceneProcessor step