Skip to content

Commit

Permalink
v2.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafa0128 committed May 20, 2024
1 parent 5b85f06 commit 8b8e1eb
Show file tree
Hide file tree
Showing 64 changed files with 647 additions and 186 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="#">
<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1643364757640-b4529458-ec8d-42cc-a2d8-c0ce60fdf50f.png" alt="SoloX" width="130">
<img src="https://cdn.nlark.com/yuque/0/2024/png/153412/1715927541315-fb4f7662-d8bb-4d3e-a712-13a3c3073ac8.png?x-oss-process=image%2Fformat%2Cwebp" alt="SoloX" width="130">
</a>
<br>
</p>
Expand All @@ -28,16 +28,14 @@ Quickly locate and analyze performance issues to improve application performance
- Install Python 3.10 + [**Download**](https://www.python.org/downloads/)
- Install adb and configure environment variables (SoloX's adb may not necessarily fit your computer) [**Download**](https://developer.android.com/studio/releases/platform-tools)

💡 Python 3.6 ~ 3.9 , please download a version of solox lower than 2.5.4.

💡 If Windows users need to test ios, install and start Itunes. [**Documentation**](https://github.com/alibaba/taobao-iphone-device)
💡 If Windows users need to test ios, install and start Itunes. [**Documentation**](https://github.com/alibaba/taobao-iphone-device) (Not support iOS17)

## 📥Installation

### default

```shell
pip install -U solox (pip install solox=={version})
pip install -U solox (pip install solox==version)
```

### mirrors
Expand All @@ -59,10 +57,10 @@ python -m solox
### customize

```shell
python -m solox --host={ip} --port={port}
python -m solox --host=ip --port=port
```

## 🏴󠁣󠁩󠁣󠁭󠁿Collect in python
## 🏴󠁣󠁩󠁣󠁭󠁿Python API

```python
# solox version : >= 2.8.5
Expand All @@ -86,7 +84,7 @@ memory_detail = apm.collectMemoryDetail() # MB
network = apm.collectNetwork(wifi=True) # KB
fps = apm.collectFps() # HZ
battery = apm.collectBattery() # level:% temperature:°C current:mA voltage:mV power:w
gpu = apm.collectGpu() # % only supports ios
gpu = apm.collectGpu() # %

# ************* Collect all performance parameter ************* #

Expand All @@ -96,15 +94,15 @@ if __name__ == '__main__':
# 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
apm.collectAll() # will generate HTML report
apm.collectAll(report_path=None) # report_path='/test/report.html'

# in other python file
from solox.public.apm import initPerformanceService

initPerformanceService.stop() # stop solox
```

## 🏴󠁣󠁩󠁣󠁭󠁿Collect in API
## 🏴󠁣󠁩󠁣󠁭󠁿Service API

### Start the service in the background

Expand All @@ -115,7 +113,7 @@ macOS/Linux: nohup python3 -m solox &
Windows: start /min python3 -m solox &
```

### Request apm data from api
### Request performance data from api

```shell
Android: http://{ip}:{port}/apm/collect?platform=Android&deviceid=ca6bd5a5&pkgname=com.bilibili.app.in&target=cpu
Expand Down
16 changes: 7 additions & 9 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="#">
<img src="https://cdn.nlark.com/yuque/0/2022/png/153412/1643364757640-b4529458-ec8d-42cc-a2d8-c0ce60fdf50f.png" alt="SoloX" width="130">
<img src="https://cdn.nlark.com/yuque/0/2024/png/153412/1715927541315-fb4f7662-d8bb-4d3e-a712-13a3c3073ac8.png?x-oss-process=image%2Fformat%2Cwebp" alt="SoloX" width="130">
</a>
<br>
</p>
Expand All @@ -27,9 +27,7 @@ SoloX是一个可以实时收集Android/iOS性能数据的web工具。
- 安装 Python 3.10 + [**Download**](https://www.python.org/downloads/)
- 安装 adb和配置好环境变量 (SoloX自带的adb不一定适配你的电脑,建议自己安装) [**Download**](https://developer.android.com/studio/releases/platform-tools)

💡 Python 3.6 ~ 3.9 , 请安装solox版本低于2.5.4.

💡 如果Windows用户需要测试iOS,请先安装Itunes. [**参考**](https://github.com/alibaba/taobao-iphone-device)
💡 如果Windows用户需要测试iOS,请先安装Itunes. [**参考**](https://github.com/alibaba/taobao-iphone-device) (不支持iOS17)

## 📥安装

Expand Down Expand Up @@ -64,7 +62,7 @@ python -m solox --host={ip} --port={port}
## 🏴󠁣󠁩󠁣󠁭󠁿使用python收集

```python

an
# solox version : >= 2.8.5
from solox.public.apm import AppPerformanceMonitor
from solox.public.common import Devices
Expand All @@ -76,7 +74,7 @@ print(processList) # ['{pid}:{packagename}',...],一个app可能会有多个
apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in',platform='Android', deviceId='ca6bd5a5', surfaceview=True,
noLog=False, pid=None, record=False, collect_all=False)
# apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in', platform='iOS')
# surfaceview: 为False时是使用gfxinfo方式,需要在手机上设置:(手机开发者 - GPU渲染模式 - adb shell dumpsys gfxinfo)
# surfaceview: 为False时是使用gfxinfo方式,需要在手机上设置:(手机开发者 - GPU渲染模式 - adb shell dumpsys gfxinfo) 不推荐使用这种方式
# noLog : False (保存测试数据到log文件中)

# ************* 收集单个性能参数 ************* #
Expand All @@ -86,7 +84,7 @@ memory_detail = apm.collectMemoryDetail() # MB
network = apm.collectNetwork(wifi=True) # KB , wifi=False时是收集移动网络,手机要切换数据流量
fps = apm.collectFps() # HZ
battery = apm.collectBattery() # level:% temperature:°C current:mA voltage:mV power:w
gpu = apm.collectGpu() # % 只支持ios
gpu = apm.collectGpu() # % 安卓只支持高通芯片的手机

# ************* 收集所有性能参数 ************* #

Expand All @@ -96,7 +94,7 @@ if __name__ == '__main__': #必须要在__name__ == '__main__'里面执行
# apm = AppPerformanceMonitor(pkgName='com.bilibili.app.in', platform='iOS', deviceId='xxxx', noLog=False, record=False, collect_all=True, duration=0)
#duration: 执行时长(秒),只有>0的时候才生效,=0时会持续执行
#record: 是否录制
apm.collectAll() # 结束会生成测试报告
apm.collectAll(report_path=None) # report_path='/test/report.html', None则保存在默认路径

# 在另外的python脚本中可以主动终止solox服务,无需等待设置的执行时长结束
from solox.public.apm import initPerformanceService
Expand Down Expand Up @@ -127,7 +125,7 @@ target in ['cpu','memory','memory_detail','network','fps','battery','gpu']
## 🔥功能

* **无需ROOT/越狱:** Android设备无需ROOT,iOS设备无需越狱。高效解决Android & iOS性能测试分析难题。
* **数据完整性:** 可提供FPS、Jank、CPU、GPU、Memory、Battery 、Network等性能参数,这些您都可以轻松获得。
* **数据完整性:** 可提供FPS、Jank、CPU、GPU、Memory、Battery 、Network、Disk等性能参数,这些您都可以轻松获得。
* **美观的报告看板:** 报告看板,您可以随时随地存储、可视化、编辑、管理和下载使用任何版本的SoloX收集的所有测试数据。
* **好用的监控设置:** 支持在监控过程中设置告警值、收集时长、访问其他PC机器的移动设备。
* **比对模式:** 支持两台移动设备同时对比测试。
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.9'
__version__ = '2.9.0'

0 comments on commit 8b8e1eb

Please sign in to comment.