SimplePerfUtil

public class SimplePerfUtil
extends Object

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


用於發送簡單命令並收集結果的實用程序類

也可以看看:

概括

嵌套類

enum SimplePerfUtil.SimplePerfType

simpleperf 命令選項的枚舉

公共方法

SimplePerfResult executeCommand (String command)

執行給定的 adb shell 命令,並帶有 simpleperf

Simpleperf 結果將被解析並返回給調用者

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

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

void executeCommand (String command, IShellOutputReceiver receiver)

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 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)

執行給定的 adb shell 命令,並帶有 simpleperf

Simpleperf 結果將被解析並返回給調用者

參數
command String : 在設備上運行的命令

退貨
SimplePerfResult SimplePerfResult對象包含所有結果信息

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

執行命令

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

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

參數
command String : 在設備上運行的命令

receiver IShellOutputReceiver : IShellOutputReceiver對象,用於將 shell 輸出定向到

maxTimeToOutputShellResponse long :允許命令不輸出任何響應的最長時間; timeUnit中指定的單位

timeUnit TimeUnit : maxTimeToOutputShellResponse 的maxTimeToOutputShellResponse單位,參見ERROR(/TimeUnit)

retryAttempts int :如果由於異常而失敗,則重試命令的最大次數。如果retryAttempts未成功執行,將拋出 DeviceNotResponsiveException。

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

執行命令

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

參數
command String : 在設備上運行的命令

receiver IShellOutputReceiver : IShellOutputReceiver對象,用於將 shell 輸出定向到

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

獲取參數列表

public  getArgumentList ()

獲取 simpleperf 命令的參數

退貨
子命令和參數列表(可為空)

新實例

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

SimplePerfUtil 構造函數

調用者在初始化實例時必須定義設備和 simpleperf 類型

參數
device ITestDevice : ITestDevice測試設備

type SimplePerfUtil.SimplePerfTypeSimplePerfType指示哪個 simpleperf 模式

退貨
SimplePerfUtil一個新創建的 SimplePerfUtil 實例

設置參數列表

public void setArgumentList ( arguList)

在 simpleperf 命令上設置參數

參數
arguList : 子命令和參數列表

受保護的方法

commandStringPreparer

protected String commandStringPreparer (String command)

參數
command String

退貨
String

,

SimplePerfUtil

public class SimplePerfUtil
extends Object

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


用於發送簡單命令並收集結果的實用程序類

也可以看看:

概括

嵌套類

enum SimplePerfUtil.SimplePerfType

simpleperf 命令選項的枚舉

公共方法

SimplePerfResult executeCommand (String command)

執行給定的 adb shell 命令,並帶有 simpleperf

Simpleperf 結果將被解析並返回給調用者

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

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

void executeCommand (String command, IShellOutputReceiver receiver)

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 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)

執行給定的 adb shell 命令,並帶有 simpleperf

Simpleperf 結果將被解析並返回給調用者

參數
command String : 在設備上運行的命令

退貨
SimplePerfResult SimplePerfResult對象包含所有結果信息

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

執行命令

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

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

參數
command String : 在設備上運行的命令

receiver IShellOutputReceiver : IShellOutputReceiver對象,用於將 shell 輸出定向到

maxTimeToOutputShellResponse long :允許命令不輸出任何響應的最長時間; timeUnit中指定的單位

timeUnit TimeUnit : maxTimeToOutputShellResponse 的maxTimeToOutputShellResponse單位,參見ERROR(/TimeUnit)

retryAttempts int :如果由於異常而失敗,則重試命令的最大次數。如果retryAttempts未成功執行,將拋出 DeviceNotResponsiveException。

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

執行命令

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

執行給定的 adb shell 命令,並帶有 simpleperf

通過接收者解析 simpleperf 結果是調用者的責任

參數
command String : 在設備上運行的命令

receiver IShellOutputReceiver : IShellOutputReceiver對象,用於將 shell 輸出定向到

投擲
DeviceNotAvailableException如果與設備的連接丟失且無法恢復

獲取參數列表

public  getArgumentList ()

獲取 simpleperf 命令的參數

退貨
子命令和參數列表(可為空)

新實例

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

SimplePerfUtil 構造函數

調用者在初始化實例時必須定義設備和 simpleperf 類型

參數
device ITestDevice : ITestDevice測試設備

type SimplePerfUtil.SimplePerfTypeSimplePerfType指示哪個 simpleperf 模式

退貨
SimplePerfUtil一個新創建的 SimplePerfUtil 實例

設置參數列表

public void setArgumentList ( arguList)

在 simpleperf 命令上設置參數

參數
arguList : 子命令和參數列表

受保護的方法

commandStringPreparer

protected String commandStringPreparer (String command)

參數
command String

退貨
String