Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_fps 始终是60.. #4

Open
Tonyzhangcanon opened this issue Jul 26, 2017 · 4 comments
Open

get_fps 始终是60.. #4

Tonyzhangcanon opened this issue Jul 26, 2017 · 4 comments

Comments

@Tonyzhangcanon
Copy link

看了一下源码,没有弄清楚获取time_block的关键字段在哪里

    for frame in frames:
        time_block = re.split(r'\s+', frame.strip())
        if len(time_block) == 3:
            try:
                print time_block
                render_time = float(time_block[0]) + float(time_block[1]) + float(time_block[2])
                print render_time
            except Exception as e:
                render_time = 0
        if render_time > 16.67:
            print 'here'
            jank_count += 1
            if render_time % 16.67 == 0:
                vsync_overtime += int(render_time / 16.67) - 1
            else:
                vsync_overtime += int(render_time / 16.67)

第一个if 只会报出异常导致render_time = 0. 第二个if 也不会执行.. 最后直接就只能输出60...

@Louis-me
Copy link
Owner

打开开发者里面的GPU呈现模式分析-在adb shell dumpsys gcxinfo中。这里打开了再试试

@Tonyzhangcanon
Copy link
Author

已经打开了, 我想你想要截取到的应该是Profile data in ms 之后的内容,

Draw	Prepare	Process	Execute
0.32	0.18	3.23	0.41
0.25	0.19	3.12	0.31
0.26	0.46	3.511.01		   			
0.28	1.31	3.49	0.54

是不是这些

@Louis-me
Copy link
Owner

是这些,我这里用过几款华为手机测试,没有发现你说的问题,你的手机机型是?

@Tonyzhangcanon
Copy link
Author

小米4C(MUI8) & Nexus6P (Android 5.0.2),两个设备都会多出Prepare一列,其他设备都没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants