check_inefficient
功能说明
msLeaks工具对外提供的自定义低效内存识别快速分析接口。
函数原型
check_inefficient(input_path: str, mem_size: int = 0, inefficient_type: List[str] = None, idle_threshold: int = 3000) # 如果无输入采用默认值
参数说明
所有输入的参数需根据list_analyzers和get_analyzer_config获取,参数信息请参见表1。
返回值说明
无返回值。
运行后会打印提示分析过程,并识别结果写到原文件中。
调用示例
import msleaks msleaks.check_inefficient(input_path="user/ineff.csv",mem_size=0, inefficient_type=["early_allocation","late_deallocation","temporary_idleness"],idle_threshold=3000 ) # input_path以用户实际路径为准
父主题: API参考