SimplePerfUtil
public class SimplePerfUtil
extends Object
java.lang.Object |
↳ | com.android.tradefed.util.SimplePerfUtil |
Classe di utilità per inviare comandi semplici e raccogliere risultati
Riepilogo
Metodi pubblici |
---|
SimplePerfResult | executeCommand (String command) Esegue il comando della shell adb specificato, con simpleperf avvolto Il risultato di Simpleperf verrà analizzato e restituito al chiamante |
void | executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) Esegue il comando della shell adb specificato, con simpleperf avvolto È responsabilità del chiamante analizzare il risultato simpleperf tramite il destinatario |
void | executeCommand (String command, IShellOutputReceiver receiver) Esegue il comando della shell adb specificato, con simpleperf avvolto È responsabilità del chiamante analizzare il risultato simpleperf tramite il destinatario |
| getArgumentList () Ottieni l'argomento per il comando simpleperf |
static SimplePerfUtil | newInstance ( ITestDevice device, SimplePerfUtil.SimplePerfType type) Costruttore SimplePerfUtil Il chiamante deve definire il dispositivo e il tipo simpleperf durante l'inizializzazione dell'istanza |
void | setArgumentList ( arguList) setArgumentList ( arguList) Imposta l'argomento sul comando simpleperf |
Metodi pubblici
eseguireCommand
public SimplePerfResult executeCommand (String command)
Esegue il comando della shell adb specificato, con simpleperf avvolto
Il risultato di Simpleperf verrà analizzato e restituito al chiamante
Parametri |
---|
command | String : comando da eseguire sul dispositivo |
eseguireCommand
public void executeCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Esegue il comando della shell adb specificato, con simpleperf avvolto
È responsabilità del chiamante analizzare il risultato simpleperf tramite il destinatario
Parametri |
---|
command | String : comando da eseguire sul dispositivo |
receiver | IShellOutputReceiver : oggetto IShellOutputReceiver a cui indirizzare l'output della shell |
maxTimeToOutputShellResponse | long : il periodo di tempo massimo durante il quale il comando può non emettere alcuna risposta; unità come specificato in timeUnit |
timeUnit | TimeUnit : unità timeUnit per maxTimeToOutputShellResponse , vedere ERROR(/TimeUnit) |
retryAttempts | int : il numero massimo di volte per riprovare il comando se fallisce a causa di un'eccezione. DeviceNotResponsiveException verrà generata se retryAttempts vengono eseguiti senza successo. |
eseguireCommand
public void executeCommand (String command,
IShellOutputReceiver receiver)
Esegue il comando della shell adb specificato, con simpleperf avvolto
È responsabilità del chiamante analizzare il risultato simpleperf tramite il destinatario
Parametri |
---|
command | String : comando da eseguire sul dispositivo |
receiver | IShellOutputReceiver : oggetto IShellOutputReceiver a cui indirizzare l'output della shell |
getArgumentList
public getArgumentList ()
Ottieni l'argomento per il comando simpleperf
ritorna |
---|
| elenco di sottocomandi e argomenti (nullable) |
setArgumentList
public void setArgumentList ( arguList)
Imposta l'argomento sul comando simpleperf
Parametri |
---|
arguList | : elenco di sottocomandi e argomenti |
Metodi protetti
comandoStringPreparer
protected String commandStringPreparer (String command)