Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
702 views
in Technique[技术] by (71.8m points)

performance - How to measure FPS on Android during app development

Is there a way (maybe some apps, hacks, libs) to measure frames per second (FPS) during app development for Android?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can use TinyDancer library.

Simply add code like:

public class DebugApplication extends Application {

  @Override public void onCreate() {

   // default config
   TinyDancer.create().show(this);

   //or customazed config
   TinyDancer.create()
      .redFlagPercentage(.1f) // set red indicator for 10%
      .startingGravity(Gravity.TOP)
      .startingXPosition(200)
      .startingYPosition(600)
      .show(this);
  }
}

And you'll see interactive view with information about current FPS on top of your screens.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...