How is gamebench implemented to calculate the FPS of unity3d games?

最后都变了- 提交于 2020-01-03 03:48:05

问题


How does Frame per second of the unity3d game engine on android mobiles captured using gamebench

Tried using the gfxinfo over adb commands, doesnt help much ?

Need more help how to calculate the FPS of unity3d games on Android ?


回答1:


My guess is that it uses these commands [programmatically]:

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

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

e.g.,

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
...

On how to interpret the results, see https://chromium.googlesource.com/chromium/src/build/+/fefabac95d6aee4d941111e67f606dc50dfe9dd1/android/pylib/perf/surface_stats_collector.py#215 and https://android.googlesource.com/platform/frameworks/native/+/86efcc0/services/surfaceflinger/FrameTracker.cpp#217



来源:https://stackoverflow.com/questions/34697737/how-is-gamebench-implemented-to-calculate-the-fps-of-unity3d-games

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!