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
993 stars 177 forks source link

Android FPS为什么有的页面能采集到变化的fps 有页面就是一个恒定的值呢 #160

Open EnjoY1024 opened 1 year ago

EnjoY1024 commented 1 year ago

python3.7 solox 2.5.3 页面A

image

页面B

image
rafa0128 commented 1 year ago

这个问题不知道怎么回答你。 从工具的角度:因为计算得出来的每秒绘制的帧数就是那个样子

rafa0128 commented 1 year ago

从app的角度:界面每秒绘制多少帧是你app的能力,这个能力是程序赋予的,所以你要追溯就要让研发和你一起分析

AnswerZhao commented 1 year ago

这么稳的帧率,目测应该是有个动画在持续执行

itsMyRepos commented 1 year ago

hi @EnjoY1024 , from where you are getting this logs? i am getting errors below [E 230530 12:16:16 fps:265] an exception hanpend in fps _collector_thread , reason unkown! [D 230530 12:16:16 fps:267] Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 240, in _collector_thread refresh_period, new_timestamps = self._get_surfaceflinger_frame_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 378, in _get_surfaceflinger_frame_data self.focus_window = self.get_surfaceview_activity() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 70, in get_surfaceview_activity activity_name = activity_line.split(' ')[2]


    IndexError: list index out of range

Please help on this
EnjoY1024 commented 1 year ago

hi @EnjoY1024 , from where you are getting this logs? i am getting errors below [E 230530 12:16:16 fps:265] an exception hanpend in fps _collector_thread , reason unkown! [D 230530 12:16:16 fps:267] Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 240, in _collector_thread refresh_period, new_timestamps = self._get_surfaceflinger_frame_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 378, in _get_surfaceflinger_frame_data self.focus_window = self.get_surfaceview_activity() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\solox\public\fps.py", line 70, in get_surfaceview_activity activity_name = activity_line.split(' ')[2] ~~~~~~~~^^^ IndexError: list index out of range

Please help on this

use api

EnjoY1024 commented 1 year ago

从app的角度:界面每秒绘制多少帧是你app的能力,这个能力是程序赋予的,所以你要追溯就要让研发和你一起分析

只有主activity获取到的是变化的,发现其他activity都是恒定的,是啥原因