项目
在 GitHub 查看

smart-test-ti/SoloX
关于
💯SoloX - 实时采集 Android/iOS 性能数据的工具(Android 性能测试、iOS 性能测试、移动端性能测试、APP 性能测试、APP 性能测试工具)
网站与应用开发可以做什么
- No ROOT/Jailbreak: No need of Root for Android devices, Jailbreak for iOS devices. Efficiently solving the test and analysis challenges in Android & iOS performance.
- Data Integrality: We provide the data about CPU, GPU, Memory, Battery, Network,FPS, Jank, etc., which you may easy to get.
- Beautiful Report: A beautiful and detailed report analysis, where to store, visualize, edit, manage, and download all the test cases collected with SoloX no matter where you are or when is it.
- Useful Monitoring Settings: Support setting alarm values, collecting duration, and accessing mobile devices on other PC machines during the monitoring process.
实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- -1
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.zh.md
原文🔎简介
SoloX是一个可以实时收集Android/iOS性能数据的web工具。
快速定位分析性能问题,提升应用的性能和品质。无需ROOT/越狱,即插即用。
📦环境
💡 如果Windows用户需要测试iOS,请先安装Itunes. 参考 (不支持iOS17)
📥安装
默认
pip install -U solox (指定版本:pip install solox==版本)
镜像
pip install -i https://mirrors.ustc.edu.cn/pypi/web/simple -U solox
💡 如果你的网络无法通过 [pip install -U solox] 下载, 可以尝试使用镜像下载,但是可能不是最新版本.
🚀启动
默认
python -m solox
自定义
python -m solox --host={ip} --port={port}
🏴使用python收集
# solox version : >= 2.9.0
from solox.public.apm import AppPerformanceMonitor
from solox.public.common import Devices
d = Devices()
processList = d.getPid(deviceId='ca6bd5a5', pkgName='com.bilibili.app.in') # for android
print(processList) # ['{pid}:{packagename}',...],一个app可能会有多个进程,如果需要指定pid,可以从这里获取
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) 不推荐使用这种方式
# noLog : False (保存测试数据到log文件中)
# ************* 收集单个性能参数 ************* #
cpu = apm.collectCpu() # %
memory = apm.collectMemory() # MB
memory_detail = apm.collectMemoryDetail() # MB
network = apm.collectNetwork(wifi=True) # KB , wifi=False时是收集移动数据流量,手机会自动关闭wifi切换到移动网络
fps = apm.collectFps() # HZ
battery = apm.collectBattery() # level:% temperature:°C current:mA voltage:mV power:w
gpu = apm.collectGpu() # % 安卓只支持高通芯片的手机
disk = apm.collectDisk() # KB
thermal = apm.collectThermal() #温度传感器,收集各个部件的温度(一些手机可能没有权限)
# ************* 收集所有性能参数 ************* #
if __name__ == '__main__': #必须要在__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='iOS', deviceId='xxxx', noLog=False, record=False, collect_all=True, duration=0)
#duration: 执行时长(秒),只有>0的时候才生效,=0时会持续执行
#record: 是否录制
apm.collectAll(report_path=None) # report_path='/test/report.html', None则保存在默认路径
# 在另外的python脚本中可以主动终止solox服务,无需等待设置的执行时长结束
from solox.public.apm import initPerformanceService
initPerformanceService.stop()
🏴使用API收集
后台启动服务
# solox version >= 2.8.7
macOS/Linux: nohup python3 -m solox &
Windows: start /min python3 -m solox &
通过api请求数据
Android: http://{ip}:{port}/apm/collect?platform=Android&deviceid=ca6bd5a5&pkgname=com.bilibili.app.in&target=cpu
iOS: http://{ip}:{port}/apm/collect?platform=iOS&pkgname=com.bilibili.app.in&target=cpu
target in ['cpu','memory','memory_detail','network','fps','battery','gpu']
🔥功能
无需ROOT/越狱: Android设备无需ROOT,iOS设备无需越狱。高效解决Android & iOS性能测试分析难题。
数据完整性: 可提供FPS、Jank、CPU、GPU、Memory、Battery 、Network、Disk等性能参数,这些您都可以轻松获得。
美观的报告看板: 报告看板,您可以随时随地存储、可视化、编辑、管理和下载使用任何版本的SoloX收集的所有测试数据。
好用的监控设置: 支持在监控过程中设置告警值、收集时长、访问其他PC机器的移动设备。
比对模式: 支持两台移动设备同时对比测试。
- 🌱2-devices: 使用两台不同的设备测试同一个app。
- 🌱2-apps: 使用两台配置相同的设备测试两个不同的app。
API收集性能数据: 支持python、API收集性能数据,帮助用户轻松集成在CI/CD流程。
浏览器

终端
- windows: PowerShell
- macOS:iTerm2 (https://iterm2.com/)
💕感谢
联系
关注公众号,直接发私信,作者看到就回复
探索相关项目
加载中…