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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled at the beginning of the specified AppStep.voidappSubStep(String... additionalInfo) Called as a substep of the previous AppStepvoidCalled at the beginning of the specified SpStep (SceneProcessor step).voidvpStep(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:AppProfilerCalled at the beginning of the specified AppStep.- Specified by:
appStepin interfaceAppProfiler- Parameters:
appStep- the application-level step that's about to begin
-
appSubStep
Description copied from interface:AppProfilerCalled as a substep of the previous AppStep- Specified by:
appSubStepin interfaceAppProfiler- Parameters:
additionalInfo- information about the substep
-
vpStep
Description copied from interface:AppProfilerCalled 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:
vpStepin 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:AppProfilerCalled 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:
spStepin interfaceAppProfiler- Parameters:
step- the SceneProcessor step that's about to beginadditionalInfo- information about the SceneProcessor step
-