SimplePerfUtil

public class SimplePerfUtil
extends Object

java.lang.Object의 클래스
   ↳ com.android.tradefed.util.SimplePerfUtil


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

참고:

요약

중첩된 클래스

enum SimplePerfUtil.SimplePerfType

Simpleperf 명령어 옵션의 열거형

공개 메서드

SimplePerfResult executeCommand(String command)

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

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

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

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

수신자를 통해 Simpleperf 결과를 파싱하는 것은 호출자의 책임

void executeCommand(String command, IShellOutputReceiver receiver)

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

수신자를 통해 Simpleperf 결과를 파싱하는 것은 호출자의 책임

getArgumentList()

Simpleperf 명령어의 인수 가져오기

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

SimplePerfUtil 생성자

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

void setArgumentList( arguList)

Simpleperf 명령어에서 인수 설정

보호된 메서드

String commandStringPreparer(String command)

공개 메서드

runCommand

public SimplePerfResult executeCommand (String command)

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

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

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

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

생성 값
DeviceNotAvailableException 기기와의 연결이 끊어져서 복구됨

runCommand

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

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

수신자를 통해 Simpleperf 결과를 파싱하는 것은 호출자의 책임

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

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

maxTimeToOutputShellResponse long: 명령어가 실행되는 최대 시간입니다. 응답을 출력해서는 안 됩니다. timeUnit에 지정된 단위

timeUnit TimeUnit: maxTimeToOutputShellResponse의 시간 단위 단위(ERROR(/TimeUnit) 참조)

retryAttempts int: 예외가 인정됩니다. retryAttempts가 다음과 같은 경우 DeviceNotRespondException이 발생합니다. 확인할 수 있습니다

생성 값
DeviceNotAvailableException 기기와의 연결이 끊어져서 복구됨

runCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

간단한 perf를 래핑하여 지정된 adb 셸 명령어 실행

수신자를 통해 Simpleperf 결과를 파싱하는 것은 호출자의 책임

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

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

생성 값
DeviceNotAvailableException 기기와의 연결이 끊어져서 복구됨

getArgumentList

public  getArgumentList ()

Simpleperf 명령어의 인수 가져오기

반환 값
하위 명령어 및 인수 목록 (null 가능)

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 : 하위 명령어 및 인수의 목록입니다.

보호된 메서드

명령어 문자열 준비자

protected String commandStringPreparer (String command)

매개변수
command String

반환 값
String