android - gamebench是如何实现计算unity3d游戏的FPS的?

标签 android unity-game-engine frame-rate

如何使用 gamebench 捕获 android 手机上的 unity3d 游戏引擎的每秒帧数

尝试通过 adb 命令使用 gfxinfo,没有多大帮助?

需要更多关于如何在 Android 上计算 unity3d 游戏的 FPS 的帮助?

最佳答案

我的猜测是它[以编程方式]使用这些命令:

(1) adb shell dumpsys SurfaceFlinger --latency-clear

(2) adb shell dumpsys SurfaceFlinger --latency <window name>

例如,

adb shell dumpsys SurfaceFlinger --latency com.android.settings/com.android.settings.SubSettings

RefreshPeriod <-- Time in nano seconds
desiredPresentTime actualPresentTime frameReadyTime <-- Time in nano seconds
desiredPresentTime actualPresentTime frameReadyTime
desiredPresentTime actualPresentTime frameReadyTime
...

关于如何解释结果,请参阅 https://chromium.googlesource.com/chromium/src/build/+/fefabac95d6aee4d941111e67f606dc50dfe9dd1/android/pylib/perf/surface_stats_collector.py#215https://android.googlesource.com/platform/frameworks/native/+/86efcc0/services/surfaceflinger/FrameTracker.cpp#217

关于android - gamebench是如何实现计算unity3d游戏的FPS的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34697737/

相关文章:

c++ - 在 openCV 中编写可变帧率视频

android - Android Play Game Services 如何重新定义显示玩家成就的默认 Activity ?

android - MVVMCross 绑定(bind) - 如何更改对象的可见性

android - SMS Intents.getMessagesFromIntent(intent) 返回 null

animation - Unity-停止动画循环

c++ - 关闭 VSync 但在我的 DirectX 9 应用程序中仍然获得 60FPS

android - 在 android 上使用包含标签的 Activity

unity-game-engine - Unity 3D - 具有相同物理尺寸的 Sprite

c# - 在运行时更改颜色查找纹理

swift - 即使在使用 `prepare` 之后,ARKit 添加节点也会导致丢帧