android - Android 应用程序中的 FPS 测试

标签 android testing frame-rate

Android 应用程序开发人员如何测试其应用程序的 FPS(每秒帧数)?我说的是一般应用,不是游戏。

它可以在模拟器或手机上。

我一直在寻找这个,但没有找到方法。如果任何开发人员都可以阐明这一点,那就太好了。

最佳答案

正如 Guykun 和 kcoppock 所提到的,如果您只使用 View 小部件或 Canvas ,您通常不会寻找 FPS 来确定视觉性能。

除了“不是游戏”之外,您没有提及自己在做什么,因此您可能想回顾一下 Android 是如何绘图的。

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

大部分性能问题都来自于在 UI 线程上执行操作。使用严格模式查找问题。

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

还可以使用工具查找性能热点:

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

如果您想了解更多关于引擎盖下发生的事情的详细信息,请参阅 Google IO session ,了解他们为硬件加速渲染所做的工作

Google I/O 2011: Accelerated Android Rendering

Google 在 UI 性能方面做了额外的工作,并在 Youtube 上提供了在 Google IO 上提供的 session :

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)

关于android - Android 应用程序中的 FPS 测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10983486/

相关文章:

android - 绑定(bind)android wifi连接

angular - 使用 UIKit 和 Angular 进行测试

scala - 每个请求上的 Gatling 2 动态查询参数

c++ - Box2D 和过剩。帧率问题

android - 从手机中获取铃声配置文件

java - 同步访问文件

JAVA简单的fps动画(我该如何使用?)

opencv - OpenCV-从网络摄像头读取时的缓冲区尺寸

java - 获取 GPS 位置时,加载另一个 URL

ruby-on-rails - RSPEC 错误 : expected: [2015-05-01 19:56:25 -0700] got: nil (compared using ==) Ruby on Rails