Closed AU3904 closed 4 years ago
补充测试:
不使用hardcoder,直接跑下面的测试代码:
long s = System.currentTimeMillis(); //模拟重度计算场景,比较耗cpu操作 for (int i = 0; i < 50; i++){ for (int j = 0; j < 10; j++){ pitest(); } try { Thread.sleep(50); } catch (InterruptedException e) { HardCoderLog.e(TAG, "startPerformance error:" + e.toString()); } } HardCoderLog.i(TAG, "startPerformance, ret:" + ret + " take " + (System.currentTimeMillis() - s) + " ms");
打印的耗时是 3800ms左右,和v7a 的效果一致,所以初步怀疑 v7a so 是不是哪里有问题
我确认一下
有确认hc通信都正常吗?可以在日志过滤下 performanceReport 发出来
performanceReport
没有performanceReport日志,
华为是没有这个回调。 so的我确认一下。
这问题啥时候能帮忙看下,提了都半个月了
因为HC的测试效果比较受当前cpu状态影响,一般需要等CPU稳定测试,并且测试多次的效果相对比较准确。更新的testapp增加了自动测试多次的按钮,建议使用新接口进行测试。 我这边重新在华为nova4以及Oppo R15上测试多次效果,v7a so和v8a so表现是基本一致的,不存在问题。
将libapp2sys 中的build.gradle 分别修改为 v7a 和 v8a
abiFilters 'armeabi-v7a',
abiFilters 'arm64-v8a',
测试mainActivity 中的start_performance,发现:
HardCoderLog.i(TAG, "startPerformance, ret:" + ret + " take " + (System.currentTimeMillis() - s) + " ms");
打印出的耗时,v7a 在3800ms左右, v8a在3400ms左右,两者差距400ms;测试机型:huawei mate 20 pro & mate 20X
从日志看并无异常,麻烦帮忙看下