SimplePerfUtil
public class SimplePerfUtil
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.SimplePerfUtil |
単純なコマンドをディスパッチして結果を収集するユーティリティクラス
参照:
概要
ネストされたクラス | |
---|---|
enum | SimplePerfUtil.SimplePerfType simpleperfコマンドオプションの列挙型 |
パブリックメソッド | |
---|---|
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) |
パブリックメソッド
executeCommand
public SimplePerfResult executeCommand (String command)
simpleperfをラップして、指定されたadbシェルコマンドを実行します
Simpleperfの結果が解析され、呼び出し元に返されますパラメーター | |
---|---|
command | String :デバイスで実行するコマンド |
戻り値 | |
---|---|
SimplePerfResult | SimplePerfResult オブジェクトには、すべての結果情報が含まれています |
投げる | |
---|---|
DeviceNotAvailableException | デバイスとの接続が失われ、回復できない場合 |
executeCommand
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 | TimeUnit :maxTimeToOutputShellResponseのtimeUnit単位maxTimeToOutputShellResponse ERROR(/TimeUnit) 参照してください。 |
retryAttempts | int :例外が原因でコマンドが失敗した場合にコマンドを再試行する最大回数。再試行が成功せずに実行された場合、 retryAttemptsがスローされます。 |
投げる | |
---|---|
DeviceNotAvailableException | デバイスとの接続が失われ、回復できない場合 |
executeCommand
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コンストラクタ
呼び出し元は、インスタンスを初期化するときにデバイスと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 |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-09-08 UTC.