SimplePerfUtil

public class SimplePerfUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.SimplePerfUtil


簡単なコマンドをディスパッチして結果を収集するユーティリティ クラス

関連項目:

概要

パブリック メソッド

SimplePerfResult executeCommand(String command)

指定された adb シェルコマンドを実行します。

Simpleperf の結果が解析され、呼び出し元に返されます。

void executeCommand(String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts)

指定された adb シェルコマンドを実行します。

レシーバを介して simpleperf の結果を解析するのは呼び出し元の責任です。

void executeCommand(String command, IShellOutputReceiver receiver)

指定された adb シェルコマンドを実行します。

レシーバを介して simpleperf の結果を解析するのは呼び出し元の責任です。

getArgumentList()

simpleperf コマンドの引数を取得する

static SimplePerfUtil newInstance(ITestDevice device, SimplePerfUtil.SimplePerfType type)

SimplePerfUtil コンストラクタ

呼び出し元は、インスタンスを初期化するときにデバイスと simpleperf タイプを定義する必要があります。

void setArgumentList( arguList)

simpleperf コマンドに引数を設定する

保護されたメソッド

String commandStringPreparer(String command)

パブリック メソッド

executeCommand

public SimplePerfResult executeCommand (String command)

指定された adb シェルコマンドを実行します。

Simpleperf の結果が解析され、呼び出し元に返されます

パラメータ
command String: デバイスで実行するコマンド

戻り値
SimplePerfResult SimplePerfResult オブジェクトにはすべての結果情報が含まれます

例外
DeviceNotAvailableException デバイスとの接続が失われ、復元できない場合

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver, 
                long maxTimeToOutputShellResponse, 
                TimeUnit timeUnit, 
                int retryAttempts)

指定された adb シェルコマンドを実行します。

レシーバを介して simpleperf の結果を解析するのは呼び出し元の責任です

パラメータ
command String: デバイスで実行するコマンド

receiver IShellOutputReceiver: シェルの出力を転送する IShellOutputReceiver オブジェクト

maxTimeToOutputShellResponse long: コマンドが応答を出力しないことを許可される最大時間(timeUnit で指定された単位)

timeUnit TimeUnit: maxTimeToOutputShellResponse の時間単位。ERROR(/TimeUnit) をご覧ください。

retryAttempts int: 例外が原因で失敗した場合にコマンドを再試行する最大回数。retryAttempts が正常に実行されなかった場合、DeviceNotResponsiveException がスローされます。

例外
DeviceNotAvailableException デバイスとの接続が失われ、復元できない場合

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

指定された adb シェルコマンドを実行します。

レシーバを介して simpleperf の結果を解析するのは呼び出し元の責任です

パラメータ
command String: デバイスで実行するコマンド

receiver IShellOutputReceiver: シェルの出力を転送する IShellOutputReceiver オブジェクト

例外
DeviceNotAvailableException デバイスとの接続が失われ、復元できない場合

getArgumentList

public  getArgumentList ()

simpleperf コマンドの引数を取得する

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

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