SimplePerfUtil

public class SimplePerfUtil
extends Object

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


आसान कमांड भेजने और नतीजे इकट्ठा करने के लिए यूटिलिटी क्लास

खास जानकारी

सार्वजनिक तरीके

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)

simpleperf कमांड पर आर्ग्युमेंट सेट करना

सुरक्षित तरीके

String commandStringPreparer(String command)

सार्वजनिक तरीके

executeCommand

public SimplePerfResult executeCommand (String command)

यह दी गई adb shell कमांड को, simpleperf के साथ रैप करके एक्ज़ीक्यूट करता है

Simpleperf के नतीजे को पार्स किया जाएगा और कॉल करने वाले को भेजा जाएगा

पैरामीटर
command String: डिवाइस पर चलाने के लिए निर्देश

रिटर्न
SimplePerfResult SimplePerfResult ऑब्जेक्ट में, नतीजे की पूरी जानकारी शामिल होती है

थ्रो
DeviceNotAvailableException अगर डिवाइस से कनेक्शन टूट जाता है और उसे वापस नहीं लाया जा सकता

executeCommand

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

यह दी गई adb shell कमांड को, simpleperf के साथ रैप करके एक्ज़ीक्यूट करता है

कॉल करने वाले व्यक्ति की यह ज़िम्मेदारी है कि वह रिसीवर के ज़रिए simpleperf के नतीजे को पार्स करे

पैरामीटर
command String: डिवाइस पर चलाने के लिए निर्देश

receiver IShellOutputReceiver: IShellOutputReceiver ऑब्जेक्ट, जिसका इस्तेमाल शेल आउटपुट को डायरेक्ट करने के लिए किया जाता है

maxTimeToOutputShellResponse long: वह ज़्यादा से ज़्यादा समय जिसके दौरान कमांड को कोई जवाब नहीं देना होता; यूनिट, timeUnit में बताई गई है

timeUnit TimeUnit: maxTimeToOutputShellResponse के लिए timeUnit यूनिट, ERROR(/TimeUnit) देखें

retryAttempts int: किसी अपवाद की वजह से कमांड के काम न करने पर, उसे फिर से आज़माने की ज़्यादा से ज़्यादा संख्या. अगर retryAttempts को पूरा नहीं किया जाता है, तो DeviceNotResponsiveException थ्रो किया जाएगा.

थ्रो
DeviceNotAvailableException अगर डिवाइस से कनेक्शन टूट जाता है और उसे वापस नहीं लाया जा सकता

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

यह दी गई adb shell कमांड को, simpleperf के साथ रैप करके एक्ज़ीक्यूट करता है

कॉल करने वाले व्यक्ति की यह ज़िम्मेदारी है कि वह रिसीवर के ज़रिए 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