Package com.jme3.app

Class DefaultAndroidProfiler

java.lang.Object
com.jme3.app.DefaultAndroidProfiler
All Implemented Interfaces:
AppProfiler

public class DefaultAndroidProfiler extends Object implements 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 Details

    • DefaultAndroidProfiler

      public DefaultAndroidProfiler()
  • Method Details

    • appStep

      public void appStep(AppStep appStep)
      Description copied from interface: AppProfiler
      Called at the beginning of the specified AppStep.
      Specified by:
      appStep in interface AppProfiler
      Parameters:
      appStep - the application-level step that's about to begin
    • appSubStep

      public void appSubStep(String... additionalInfo)
      Description copied from interface: AppProfiler
      Called as a substep of the previous AppStep
      Specified by:
      appSubStep in interface AppProfiler
      Parameters:
      additionalInfo - information about the substep
    • vpStep

      public void vpStep(VpStep vpStep, ViewPort vp, RenderQueue.Bucket bucket)
      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 interface AppProfiler
      Parameters:
      vpStep - the ViewPort-level step that's about to begin
      vp - which ViewPort is being processed
      bucket - which Bucket is being processed
    • spStep

      public void spStep(SpStep step, String... additionalInfo)
      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 interface AppProfiler
      Parameters:
      step - the SceneProcessor step that's about to begin
      additionalInfo - information about the SceneProcessor step