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)

simpleperf 명령어에 인수 설정

보호된 메서드

String commandStringPreparer(String command)

공개 메서드

executeCommand

public SimplePerfResult executeCommand (String command)

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

Simpleperf 결과가 파싱되어 호출자에게 반환됩니다.

매개변수
command String: 기기에서 실행할 명령어

반환 값
SimplePerfResult SimplePerfResult 객체에 모든 결과 정보가 포함됨

생성 값
DeviceNotAvailableException 기기와의 연결이 끊어져 복구할 수 없는 경우

executeCommand

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 기기와의 연결이 끊어져 복구할 수 없는 경우

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

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

수신기를 통해 simpleperf 결과를 파싱하는 것은 호출자의 책임입니다.

매개변수
command String: 기기에서 실행할 명령어

receiver IShellOutputReceiver: 셸 출력을 전달할 IShellOutputReceiver 객체입니다.

생성 값
DeviceNotAvailableException 기기와의 연결이 끊어져 복구할 수 없는 경우

getArgumentList

public  getArgumentList ()

simpleperf 명령어의 인수 가져오기

반환 값
하위 명령어 및 인수 목록 (nullable)

newInstance

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