smart-test-ti / SoloX

💯SoloX - Real-time collection tool for Android/iOS performance data.(Android性能测试android performance\iOS性能测试ios performance\移动端性能测试mobile performance\APP性能测试app performance\app性能测试工具)
https://smart-test-ti.github.io/solox
MIT License
979 stars 173 forks source link

Unable to obtain FPS value for Android devices #232

Open cooltaby opened 10 months ago

cooltaby commented 10 months ago

[BUG]. Unable to get FPS values on Android devices Tested on Android devices, google pixel 6, Samsung fold and other android devices with different OS, and mobile games. Errors log:

`[E 231028 20:53:05 fps:327] an exception hanpend in fps _collector_thread , reason unkown! [D 231028 20:53:05 fps:329] Traceback (most recent call last): File "C:\Users\EVM\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 302, in _collector_thread refresh_period, new_timestamps = self._get_surfaceflinger_frame_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\EVM\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 411, in _get_surfaceflinger_frame_data refresh_period = (int(results[0].split('=')[1].strip()) - nanoseconds_per_second) / nanoseconds_per_second ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'now = 666332703981869'

[E 231028 20:53:05 fps:327] an exception hanpend in fps _collector_thread , reason unkown! [D 231028 20:53:05 fps:329] Traceback (most recent call last): File "C:\Users\EVM\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 302, in _collector_thread refresh_period, new_timestamps = self._get_surfaceflinger_frame_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\EVM\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 411, in _get_surfaceflinger_frame_data refresh_period = (int(results[0].split('=')[1].strip()) - nanoseconds_per_second) / nanoseconds_per_second ^^^^^^^^^^^^^^^ ValueError: invalid literal for int() with base 10: 'now = 666332807100869'

[E 231028 20:53:05 fps:327] an exception hanpend in fps _collector_thread , reason unkown!`

Note: Also tried: Step1 : You can turn off the 'SurfaceView' switch Step2 : Set the following settings on your phone: (Developer - GPU rendering mode - adb shell dumpsys gfxinfo)

But still not able to get FPS value.

@rafa0128

rafa0128 commented 10 months ago

It looks like old code, show me the version of solox

cooltaby commented 10 months ago

solox version

rafa0128 commented 10 months ago

it's weird, please reinstall solox and try again,the error code was in old version