10

How can an android application developer test FPS (Frames per second) for their application? I'm talking about general application, not game.

It can be on emulator or phone.

I've been looking for this but have not found a way. It would be great, if any developer can shed light on this.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
  • If not a game, can you clarify why you are looking for FPS? – Morrison Chang Jun 11 '12 at 15:51
  • 2
    @MorrisonChang It's still very important for general applications to have a smooth look and feel, just as much so as a game. Stuttering and skipping while scrolling are definitely detrimental to the user experience. I don't know that finding a particular FPS number is necessary for a typical app, though. – Kevin Coppock Jun 11 '12 at 15:58
  • Instead of using FPS as a measure of performance. On 4.0 you can enable 'Strict Mode' under Developer Options in settings to flash the screen if heavy tasks are performed on the UI thread. These will be the kind of tasks and performance drops you want to look out for. – Guykun Jun 11 '12 at 16:00
  • @Morrison Chang:In a general application,say,if a user is having a big list,in this case ,finding FPS will be helpful.How do ppl find fps? –  Jun 12 '12 at 07:21
  • @kcoppock:Can you tell me,how to find FPS. –  Jun 12 '12 at 07:23

4 Answers4

7

As mention by Guykun and kcoppock, if you are only using the View widgets or Canvas you normally don't look for FPS to determine visual performance.

As you don't mention what you are doing other than 'not a game' you may want to review how Android does drawing.

http://developer.android.com/guide/topics/graphics/2d-graphics.html

Most of the performance issues come from doing stuff on the UI thread. Use Strict Mode for finding problems.

http://android-developers.blogspot.com/2010/12/new-gingerbread-api-strictmode.html

Also use the tools to find performance hot spots:

https://developer.android.com/topic/performance

https://developer.android.com/topic/performance/rendering/inspect-gpu-rendering

https://developer.android.com/topic/performance/rendering/optimizing-view-hierarchies

And if you want more details of what's going on under the hood see the Google IO session on what they did for Hardware Accelerated Rendering

Google I/O 2011: Accelerated Android Rendering

Google has done additional work on UI performance and have presented sessions at Google IO available on Youtube:

Google I/O 2012 - For Butter or Worse: Smoothing Out Performance in Android UIs

Google I/O 2013 - Android Graphics Performance

Android performance: UI (Google I/O '17)

Drawn out: How Android renders (Google I/O '18)

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
1

You can use TinyDancer

For details please review my answer here

Community
  • 1
  • 1
Nick Moskalenko
  • 941
  • 9
  • 10
-1

There are apps available in the marketplace that can measure FPS of other games. Please try GameBench for instance and it can show you the FPS.

[Disclaimer]: I am one of the founders of GameBench.

Karthik H
  • 123
  • 1
  • 11
-2

I have used GameBench for FPS Analysis of an android application(it is not a game, I wanted to check the FPS when an animation of my app starts running). GameBench captures key frame rate (FPS) metrics, which are the best objective indicator of the fluidity of a UX.

My requirement was to verify the FPS to be 30FPS when an animation of my android application starts.

I have verified the following with the Graph report provided by the GameBench tool,

  • When the animation starts, the FPS moved from 0 FPS to 30FPS.
  • When the animation ends the FPS moved from 30FPS to 0 FPS

See screenshot.

enter image description here

To use this tool, you have to install an android application and a desktop launcher.

  1. Install the GameBench application in your android device.
  2. Register to GameBench using an email address and install the desktop application.
  3. Download and install the GameBench Desktop Launcher.
  4. Connect the device with the desktop. You may receive a pop-up on your device asking you to allow USB Debugging
  5. In the GameBench Android app, you can select the app(which I already installed on the tablet) for the analysis.
  6. Then you can record the Frame per seconds and generate the report(its available in web dashboard too, the FPS,screenshot, performance,battery etc).

Reference:

  1. https://play.google.com/store/apps/details?id=com.gamebench.metricscollector
  2. https://www.gamebench.net/
  3. https://docs.gamebench.net/web-dashboard/getting-started

As a side note,

I have used FPS Meter app also, but it seems inaccurate in my case. Got 29FPS to 31 FPS when my animation in the android application starts. Expected FPS is 30FPS.

https://play.google.com/store/apps/details?id=com.ftpie.fpsmeter&hl=en

Hardian
  • 1,922
  • 22
  • 23