Skip to content

Commit

Permalink
v2.8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa0128 committed Dec 27, 2023
1 parent ea99674 commit 4768305
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 246 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a>English</a> | <a href="./README.zh.md">中文</a> | <a href="./FAQ.md">FAQ</a>
<a>English</a> | <a href="./README.zh.md">中文</a> | <a href="./FAQ.md">FAQ</a> | <a href="https://mp.weixin.qq.com/s?__biz=MzkxMzYyNDM2NA==&mid=2247484506&idx=1&sn=b7eb6de68f84bed03001375d08e08ce9&chksm=c17b9819f60c110fd14e652c104237821b95a13da04618e98d2cf27afa798cb45e53cf50f5bd&token=1402046775&lang=zh_CN&poc_token=HKmRi2WjP7gf9CVwvLWQ2cRhrUR3wmbB9-fNZdD4" target="__blank">使用文档</a>
</p>

<p align="center">
Expand Down
2 changes: 1 addition & 1 deletion README.zh.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<a>中文</a> | <a href="./README.md">English</a> | <a href="./FAQ.md">FAQ</a>
<a>中文</a> | <a href="./README.md">English</a> | <a href="./FAQ.md">FAQ</a> | <a href="https://mp.weixin.qq.com/s?__biz=MzkxMzYyNDM2NA==&mid=2247484506&idx=1&sn=b7eb6de68f84bed03001375d08e08ce9&chksm=c17b9819f60c110fd14e652c104237821b95a13da04618e98d2cf27afa798cb45e53cf50f5bd&token=1402046775&lang=zh_CN&poc_token=HKmRi2WjP7gf9CVwvLWQ2cRhrUR3wmbB9-fNZdD4" target="__blank">使用文档</a>
</p>

<p align="center">
Expand Down
4 changes: 2 additions & 2 deletions solox/public/_iosPerf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from collections import defaultdict, namedtuple
from typing import Any, Iterator, Optional, Tuple, Union
import weakref
from public.iosperf._device import BaseDevice
from public.iosperf._proto import *
from solox.public.iosperf._device import BaseDevice
from solox.public.iosperf._proto import *


class DataType(str, enum.Enum):
Expand Down
9 changes: 3 additions & 6 deletions solox/public/android_fps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import time
import traceback
from logzero import logger
from public.adb import adb
from public.common import Devices
from solox.public.adb import adb
from solox.public.common import Devices

d = Devices()

Expand Down Expand Up @@ -413,12 +413,11 @@ def _get_surfaceflinger_frame_data(self):
results = adb.shell(
cmd='dumpsys SurfaceFlinger --latency \\"%s\\"' % self.focus_window, deviceId=self.device)
results = results.replace("\r\n", "\n").splitlines()
if len(results) <= 1 or int(results[-1].split()[0]) ==0:
if len(results) <= 1 or int(results[-2].split()[0]) ==0:
self.focus_window = self.get_surfaceview_activity()
results = adb.shell(
cmd='dumpsys SurfaceFlinger --latency \\"%s\\"' % self.focus_window, deviceId=self.device)
results = results.replace("\r\n", "\n").splitlines()
print(self.focus_window)
if not len(results):
return (None, None)
if not results[0].isdigit():
Expand All @@ -433,12 +432,10 @@ def _get_surfaceflinger_frame_data(self):
# Since we only care about completed frames, we will ignore any timestamps
# with this value.

print(results)
for line in results[2:]:
fields = line.split()
if len(fields) != 3:
continue
print(fields)
timestamp = [int(fields[0]), int(fields[1]), int(fields[2])]
if timestamp[1] == pending_fence_timestamp:
continue
Expand Down
15 changes: 8 additions & 7 deletions solox/public/apm.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
from logzero import logger
import tidevice
import multiprocessing
import public._iosPerf as iosP
from public.iosperf._perf import DataType, Performance
from public.adb import adb
from public.common import Devices, File, Method, Platform, Scrcpy
from public.android_fps import FPSMonitor, TimeUtils
import solox.public._iosPerf as iosP
from solox.public.iosperf._perf import DataType, Performance
from solox.public.adb import adb
from solox.public.common import Devices, File, Method, Platform, Scrcpy
from solox.public.android_fps import FPSMonitor, TimeUtils

d = Devices()
f = File()
Expand Down Expand Up @@ -146,11 +146,12 @@ def getAndroidMemory(self):
try:
cmd = 'dumpsys meminfo {}'.format(self.pid)
output = adb.shell(cmd=cmd, deviceId=self.deviceId)
logger.info(f'memory info: {output}')
m_total = re.search(r'TOTAL:\s*(\d+)', output)
m_total = re.search(r'TOTAL\s*(\d+)', output)
if not m_total:
m_total = re.search(r'TOTAL PSS:\s*(\d+)', output)
m_swap = re.search(r'TOTAL SWAP PSS:\s*(\d+)', output)
if not m_swap:
m_swap = re.search(r'TOTAL SWAP (KB):\s*(\d+)', output)
totalPass = round(float(float(m_total.group(1))) / 1024, 2)
swapPass = round(float(float(m_swap.group(1))) / 1024, 2)
except Exception as e:
Expand Down
6 changes: 3 additions & 3 deletions solox/public/apm_pk.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import re
import os
import time
from public.adb import adb
from public.common import Devices, File
from public.android_fps import FPSMonitor, TimeUtils
from solox.public.adb import adb
from solox.public.common import Devices, File
from solox.public.android_fps import FPSMonitor, TimeUtils

d = Devices()
f = File()
Expand Down
2 changes: 1 addition & 1 deletion solox/public/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from jinja2 import Environment, FileSystemLoader
from tidevice._device import Device
from tidevice import Usbmux
from public.adb import adb
from solox.public.adb import adb


class Platform:
Expand Down
Loading

0 comments on commit 4768305

Please sign in to comment.