SimplePerfUtil
public class SimplePerfUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.SimplePerfUtil |
簡単なコマンドをディスパッチして結果を収集するユーティリティ クラス
以下も参照してください。
まとめ
公開メソッド | |
---|---|
SimplePerfResult | executeCommand (String command) simpleperf をラップして、指定された adb shell コマンドを実行します Simpleperf の結果は解析され、呼び出し元に返されます |
void | executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) simpleperf をラップして、指定された adb shell コマンドを実行します レシーバーを介して simpleperf の結果を解析するのは、呼び出し元の責任です。 |
void | executeCommand (String command, IShellOutputReceiver receiver) simpleperf をラップして、指定された adb shell コマンドを実行します レシーバーを介して simpleperf の結果を解析するのは、呼び出し元の責任です。 |
getArgumentList () simpleperf コマンドの引数を取得する | |
static SimplePerfUtil | newInstance ( ITestDevice device, SimplePerfUtil.SimplePerfType type) SimplePerfUtil コンストラクター インスタンスを初期化するとき、呼び出し元はデバイスと simpleperf タイプを定義する必要があります |
void | setArgumentList ( arguList) setArgumentList ( arguList) simpleperf コマンドに引数を設定 |
保護されたメソッド | |
---|---|
String | commandStringPreparer (String command) |
公開メソッド
executeCommand
public SimplePerfResult executeCommand (String command)
simpleperf をラップして、指定された adb shell コマンドを実行します
Simpleperf の結果は解析され、呼び出し元に返されますパラメーター | |
---|---|
command | String : デバイスで実行するコマンド |
戻り値 | |
---|---|
SimplePerfResult | SimplePerfResult オブジェクトにはすべての結果情報が含まれます |
スロー | |
---|---|
DeviceNotAvailableException | デバイスとの接続が失われ、回復できない場合 |
executeCommand
public void executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)
simpleperf をラップして、指定された adb shell コマンドを実行します
レシーバーを介して 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 shell コマンドを実行します
レシーバーを介して 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 |