Package com.jme3.app
Class DefaultAndroidProfiler
java.lang.Object
com.jme3.app.DefaultAndroidProfiler
- All Implemented Interfaces:
AppProfiler
An AppProfiler implementation that integrates the
per-frame application-wide timings for update versus
render into the Android systrace utility.
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called at the beginning of the specified AppStep.void
appSubStep
(String... additionalInfo) Called as a substep of the previous AppStepvoid
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.
-
Constructor Details
-
DefaultAndroidProfiler
public DefaultAndroidProfiler()
-
-
Method Details
-
appStep
Description copied from interface:AppProfiler
Called at the beginning of the specified AppStep.- Specified by:
appStep
in interfaceAppProfiler
- Parameters:
appStep
- the application-level step that's about to begin
-
appSubStep
Description copied from interface:AppProfiler
Called as a substep of the previous AppStep- Specified by:
appSubStep
in interfaceAppProfiler
- Parameters:
additionalInfo
- information about the substep
-
vpStep
Description copied from interface:AppProfiler
Called at the beginning of the specified VpStep during the rendering of the specified ViewPort. For bucket-specific steps the Bucket parameter will be non-null.- Specified by:
vpStep
in interfaceAppProfiler
- Parameters:
vpStep
- the ViewPort-level step that's about to beginvp
- which ViewPort is being processedbucket
- which Bucket is being processed
-
spStep
Description copied from interface:AppProfiler
Called at the beginning of the specified SpStep (SceneProcessor step). For more detailed steps it is possible to provide additional information as strings, like the name of the processor.- Specified by:
spStep
in interfaceAppProfiler
- Parameters:
step
- the SceneProcessor step that's about to beginadditionalInfo
- information about the SceneProcessor step
-