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
publicgetArgumentList ()
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 |