标签:com pack bsp stderr inf pos 工具 txt cas
import subprocess from time import sleep package = ‘com.wangpos.by.cashier3‘ memory_name = ‘adb shell dumpsys meminfo {} | findstr "Pss"‘.format(package) memory = ‘adb shell dumpsys meminfo {} | findstr "Pss"‘.format(package) log_name = open(‘log.txt‘, ‘w‘) for i in range(100000): subprocess.Popen(memory, stderr=log_name, stdout=subprocess.PIPE,shell=True) sleep(5) cpu = ‘adb shell top -n 1 | findstr "PID"‘ cpu_exec = ‘adb shell top -n 1 | findstr {package}‘.format(package=package) for i in range(10000): subprocess.Popen(cpu_exec, stderr=log_name,stdout=subprocess.PIPE)
标签:com pack bsp stderr inf pos 工具 txt cas
原文地址:https://www.cnblogs.com/jiablogs/p/11135588.html