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 コンストラクター

呼び出し元はインスタンスの初期化時にデバイスと 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 コマンドの引数を取得する

戻り値
サブコマンドと引数のリスト (null 可能)

新しいインスタンス

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