Package com.jme3.app

Class DefaultAndroidProfiler

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

public class DefaultAndroidProfiler extends Object implements com.jme3.profile.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.
Author:
iwgeric
  • Constructor Details

    • DefaultAndroidProfiler

      public DefaultAndroidProfiler()
  • Method Details

    • appStep

      public void appStep(com.jme3.profile.AppStep appStep)
      Specified by:
      appStep in interface com.jme3.profile.AppProfiler
    • appSubStep

      public void appSubStep(String... additionalInfo)
      Specified by:
      appSubStep in interface com.jme3.profile.AppProfiler
    • vpStep

      public void vpStep(com.jme3.profile.VpStep vpStep, com.jme3.renderer.ViewPort vp, com.jme3.renderer.queue.RenderQueue.Bucket bucket)
      Specified by:
      vpStep in interface com.jme3.profile.AppProfiler
    • spStep

      public void spStep(com.jme3.profile.SpStep step, String... additionalInfo)
      Specified by:
      spStep in interface com.jme3.profile.AppProfiler