SimplePerfUtil
public class SimplePerfUtil
extends Object
java.lang.객체 | |
↳ | 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 생성자 호출자는 인스턴스를 초기화할 때 device 및 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
publicgetArgumentList ()
simpleperf 명령에 대한 인수 가져오기
보고 | |
---|---|
하위 명령 및 인수 목록(null 가능) |
newInstance
public static SimplePerfUtil newInstance (ITestDevice device, SimplePerfUtil.SimplePerfType type)
SimplePerfUtil 생성자
호출자는 인스턴스를 초기화할 때 device 및 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 |