SimplePerfUtil
public class SimplePerfUtil
extends Object
java.lang.Objeto |
↳ | com.android.tradefed.util.SimplePerfUtil |
Clase de utilidad para enviar comandos simples y recopilar resultados
Resumen
Métodos públicos |
---|
SimplePerfResult | executeCommand (String command) Ejecuta el comando adb shell dado, con simpleperf envuelto El resultado de Simpleperf se analizará y volverá a la persona que llama |
void | executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) Ejecuta el comando adb shell dado, con simpleperf envuelto Es responsabilidad de la persona que llama analizar el resultado de simpleperf a través del receptor |
void | executeCommand (String command, IShellOutputReceiver receiver) Ejecuta el comando adb shell dado, con simpleperf envuelto Es responsabilidad de la persona que llama analizar el resultado de simpleperf a través del receptor |
| getArgumentList () Obtener argumento para el comando simpleperf |
static SimplePerfUtil | newInstance ( ITestDevice device, SimplePerfUtil.SimplePerfType type) Constructor SimplePerfUtil La persona que llama debe definir el dispositivo y el tipo simpleperf al inicializar la instancia |
void | setArgumentList ( arguList) setArgumentList ( arguList) Establecer argumento en el comando simpleperf |
Métodos públicos
Ejecutar comando
public SimplePerfResult executeCommand (String command)
Ejecuta el comando adb shell dado, con simpleperf envuelto
El resultado de Simpleperf se analizará y volverá a la persona que llama
Parámetros |
---|
command | String : comando para ejecutar en el dispositivo |
Ejecutar comando
public void executeCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Ejecuta el comando adb shell dado, con simpleperf envuelto
Es responsabilidad de la persona que llama analizar el resultado de simpleperf a través del receptor
Parámetros |
---|
command | String : comando para ejecutar en el dispositivo |
receiver | IShellOutputReceiver : objeto IShellOutputReceiver para dirigir la salida del shell a |
maxTimeToOutputShellResponse | long : la cantidad máxima de tiempo durante el cual se permite que el comando no emita ninguna respuesta; unidad como se especifica en timeUnit |
timeUnit | TimeUnit : unidad timeUnit para maxTimeToOutputShellResponse , consulte ERROR(/TimeUnit) |
retryAttempts | int : el número máximo de veces para reintentar el comando si falla debido a una excepción. Se lanzará DeviceNotResponsiveException si se realizan retryAttempts sin éxito. |
Ejecutar comando
public void executeCommand (String command,
IShellOutputReceiver receiver)
Ejecuta el comando adb shell dado, con simpleperf envuelto
Es responsabilidad de la persona que llama analizar el resultado de simpleperf a través del receptor
Parámetros |
---|
command | String : comando para ejecutar en el dispositivo |
receiver | IShellOutputReceiver : objeto IShellOutputReceiver para dirigir la salida del shell a |
getArgumentList
public getArgumentList ()
Obtener argumento para el comando simpleperf
Devoluciones |
---|
| lista de subcomandos y argumentos (anulables) |
setArgumentList
public void setArgumentList ( arguList)
Establecer argumento en el comando simpleperf
Parámetros |
---|
arguList | : lista de subcomandos y argumentos |
Métodos protegidos
comandoStringPreparer
protected String commandStringPreparer (String command)
Parámetros |
---|
command | String |