示例#1
0
__author__ = 'kasi'
#coding=utf-8
import re
import os

from Core.Utils.Cmd.adb_interface import AdbInterface
from Core.Action.Log.log import Log
from Core.Action.System.system import SystemAction
from app import AppInfo

shell = AdbInterface()
a = AppInfo()
l = Log()
s = SystemAction()
killLogcatPath = os.path.join(os.path.abspath(".."), "Core", "Lib", "cmd",
                              "kl.bat")


class PerformanceInfo(object):
    """
    获取部分app性能信息
    """
    def __init__(self):
        self.pattern = re.compile(r"\d+")

    def getAppStartTotalTime(self, component):
        """
     获取启动应用所花时间
      args:
        - component -: 组件
     usage: getAppStartTotalTime("com.android.settings/.Settings")