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)

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 が親の場合、DeviceNotRespondException がスローされます。 表示されます。

例外
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