Skip to content

Commit

Permalink
fix: ios used the android,s api
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa0128 committed Nov 28, 2023
1 parent 388ea5d commit dbd9a60
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ d = Devices()
processList = d.getPid(deviceId='ca6bd5a5', pkgName='com.bilibili.app.in') # for android
print(processList) # ['{pid}:{packagename}',...]

apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in',platform='Android', deviceId='ca6bd5a5', surfaceview=True, noLog=False, pid=None, record=False, collect_all=False, duration=0)
apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in',platform='Android', deviceId='ca6bd5a5', surfaceview=True,
noLog=False, pid=None, record=False, collect_all=False, duration=0)
# apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in', platform='iOS') only supports one device
# surfaceview: False = gfxinfo (Developer - GPU rendering mode - adb shell dumpsys gfxinfo)
# noLog : False (Save test data to log file)
Expand All @@ -91,7 +92,8 @@ gpu = apm.collectGpu() # % only supports ios
# ************* Collect all performance parameter ************* #

if __name__ == '__main__':
apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in',platform='Android', deviceId='ca6bd5a5', surfaceview=True, noLog=False, pid=None, record=False, collect_all=True, duration=0)
apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in',platform='Android', deviceId='ca6bd5a5', surfaceview=True,
noLog=False, pid=None, record=False, collect_all=True, duration=0)
# apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in', platform='iOS', deviceId='xxxx', noLog=False, record=False, collect_all=True, duration=0)
#duration: running time (second)
#record: record android screen
Expand Down
2 changes: 1 addition & 1 deletion solox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from __future__ import absolute_import

__version__ = '2.8.5'
__version__ = '2.8.6'
2 changes: 1 addition & 1 deletion solox/public/apm.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ def collectBattery(self):

def collectNetwork(self, wifi=True):
_network = Network(self.pkgName, self.deviceId, self.platform, pid=self.pid)
if self.noLog is False:
if self.noLog is False and self.platform == Platform.Android:
data = _network.setAndroidNet(wifi=wifi)
f.record_net('pre', data[0], data[1])
result = {}
Expand Down
2 changes: 1 addition & 1 deletion solox/public/config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"run_switch": "off"}
{"run_switch": "on"}

0 comments on commit dbd9a60

Please sign in to comment.