SimplePerfUtil

public class SimplePerfUtil
extends Object

java.lang.Object
com.android.tradefed.util.SimplePerfUtil


간단한 명령을 전달하고 결과를 수집하는 유틸리티 클래스

또한보십시오:

요약

공개 메소드

SimplePerfResult executeCommand (String command)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

Simpleperf 결과가 구문 분석되어 호출자에게 반환됩니다.

void executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

수신자를 통해 simpleperf 결과를 구문 분석하는 것은 호출자의 책임입니다.

void executeCommand (String command, IShellOutputReceiver receiver)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

수신자를 통해 simpleperf 결과를 구문 분석하는 것은 호출자의 책임입니다.

getArgumentList ()

simpleperf 명령에 대한 인수 가져오기

static SimplePerfUtil newInstance ( ITestDevice device, SimplePerfUtil.SimplePerfType type)

SimplePerfUtil 생성자

호출자는 인스턴스를 초기화할 때 장치 및 simpleperf 유형을 정의해야 합니다.

void setArgumentList ( arguList) setArgumentList ( arguList)

simpleperf 명령에 대한 인수 설정

보호된 방법

String commandStringPreparer (String command)

공개 메소드

실행명령

public SimplePerfResult executeCommand (String command)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

Simpleperf 결과가 구문 분석되어 호출자에게 반환됩니다.

매개변수
command String : 장치에서 실행할 명령

보고
SimplePerfResult SimplePerfResult 객체에는 모든 결과 정보가 포함됩니다.

던지기
DeviceNotAvailableException 장치와의 연결이 끊어져 복구할 수 없는 경우

실행명령

public void executeCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

수신자를 통해 simpleperf 결과를 구문 분석하는 것은 호출자의 책임입니다.

매개변수
command String : 장치에서 실행할 명령

receiver IShellOutputReceiver : 셸 출력을 전달할 IShellOutputReceiver 개체

maxTimeToOutputShellResponse long : 명령이 응답을 출력하지 않도록 허용되는 최대 시간입니다. timeUnit 에 지정된 단위

timeUnit TimeUnit : maxTimeToOutputShellResponse 에 대한 timeUnit 단위, ERROR(/TimeUnit) 참조

retryAttempts int : 예외로 인해 명령이 실패한 경우 명령을 재시도할 최대 횟수입니다. retryAttempts 성공적으로 수행되지 않으면 DeviceNotResponsiveException이 발생합니다.

던지기
DeviceNotAvailableException 장치와의 연결이 끊어져 복구할 수 없는 경우

실행명령

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

simpleperf를 래핑하여 지정된 adb 쉘 명령을 실행합니다.

수신자를 통해 simpleperf 결과를 구문 분석하는 것은 호출자의 책임입니다.

매개변수
command String : 장치에서 실행할 명령

receiver IShellOutputReceiver : 셸 출력을 전달할 IShellOutputReceiver 개체

던지기
DeviceNotAvailableException 장치와의 연결이 끊어져 복구할 수 없는 경우

getArgumentList

public  getArgumentList ()

simpleperf 명령에 대한 인수 가져오기

보고
하위 명령 및 인수 목록(널 입력 가능)

새로운인스턴스

public static SimplePerfUtil newInstance (ITestDevice device, 
                SimplePerfUtil.SimplePerfType type)

SimplePerfUtil 생성자

호출자는 인스턴스를 초기화할 때 장치 및 simpleperf 유형을 정의해야 합니다.

매개변수
device ITestDevice : ITestDevice 테스트 장치

type SimplePerfUtil.SimplePerfType : SimplePerfType simpleperf 모드를 나타냅니다.

보고
SimplePerfUtil 새로 생성된 SimplePerfUtil 인스턴스

setArgumentList

public void setArgumentList ( arguList)

simpleperf 명령에 대한 인수 설정

매개변수
arguList : 하위 명령 및 인수 목록

보호된 방법

commandStringPreparer

protected String commandStringPreparer (String command)

매개변수
command String

보고
String