繁体   English   中英

如何实现gamebench以计算unity3d游戏的FPS?

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

如何使用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/平台/框架/本地/ + / 86efcc0 /服务/ SurfaceFlinger的/ FrameTracker.cpp#217

void Update()
{
    float fps = 1f / Time.deltaTime;
    Debug.Log(fps);
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM