- 文档首页
应用性能监控全链路版
用户指南
客户端监控
App 端监控
常见问题
iOS 端监控
如何屏蔽自动化任务中产生的 OOM 问题
iOS 端监控
如何屏蔽自动化任务中产生的 OOM 问题
如何屏蔽自动化任务中产生的 OOM 问题
但在实际场景中,APMPlus 无法完全适配的自动化场景,一是因为自动化框架比较多,二是也有客户自建自动化框架。在运行自动化测试过程中,SDK 无法识别某些场景的退出,只能将退出归因为 OOM 问题,产生误报。因此,我们为客户暴露了一些接口来标记是否处于自动化场景中,标记之后,在自动化测试过程中不会上报任何 OOM 数据。
说明
- APMPlus 从 5.1.1 版本起支持本文描述的功能。
#import <RangersAPM+OOMCrashConfig.h>
声明程序运行在自动化测试中。若 isAutoTest 传递为 YES,会屏蔽掉所有的 OOM 问题。默认是NO。
1. 请不要在生产环境中调用此函数,否则会造成 OOM 数据不会上报。
2. 请在初始化 APM 之前,即 +[RangersAPM startWithConfig:] 函数执行之前,调用该函数。
Declare that the program is running in automated testing. If isAutoTest is passed as YES, all OOM problems will be blocked. Default is NO.
1. Please do not call this function in a production environment, otherwise OOM data will not be reported.
2. Call this function before initializing APM, that is, before the +[RangersAPM startWithConfig:] function executes.
[RangersAPM OOMCrashMarkAutoTest:YES];
最近更新时间:2025.09.01 20:17:23