SimplePerfUtil

public class SimplePerfUtil
extends Object

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


סיווג שירות לשלוח פקודות פשוטות ולאסוף תוצאות

מידע נוסף:

סיכום

שיטות ציבוריות

SimplePerfResult executeCommand(String command)

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

התוצאה של Simpleperf תפורסם ותוחזר למבצע הקריאה

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

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

הקריאה היא האחראית לנתח את התוצאה של simpleperf דרך המכשיר המקבל

void executeCommand(String command, IShellOutputReceiver receiver)

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

הקריאה היא האחראית לנתח את התוצאה של simpleperf דרך המכשיר המקבל

getArgumentList()

אחזור ארגומנט לפקודה simpleperf

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

ה-constructor של SimplePerfUtil

מבצע הקריאה החוזרת חייב להגדיר את המכשיר ואת סוג simpleperf בזמן שמפעילים את המופע

void setArgumentList( arguList)

הגדרת ארגומנט בפקודה simpleperf

שיטות מוגנות

String commandStringPreparer(String command)

שיטות ציבוריות

executeCommand

public SimplePerfResult executeCommand (String command)

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

התוצאה של Simpleperf תפורסם ותוחזר למבצע הקריאה

פרמטרים
command String: הפקודה להרצה במכשיר

החזרות
SimplePerfResult האובייקט SimplePerfResult מכיל את כל פרטי התוצאה

זריקות
DeviceNotAvailableException אם החיבור למכשיר אבד ולא ניתן לשחזר אותו

executeCommand

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

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

הקריאה היא האחראית לנתח את התוצאה של simpleperf דרך המכשיר המקבל

פרמטרים
command String: הפקודה להרצה במכשיר

receiver IShellOutputReceiver: אובייקט IShellOutputReceiver להפניית הפלט של המעטפת אל

maxTimeToOutputShellResponse long: משך הזמן המקסימלי שבו הפקודה יכולה שלא להפיק תגובה כלשהי. היחידות הן כפי שצוינו ב-timeUnit.

timeUnit TimeUnit: היחידה של timeUnit עבור maxTimeToOutputShellResponse, ראו ERROR(/TimeUnit)

retryAttempts int: מספר הניסיונות המקסימלי לניסיון חוזר של הפקודה אם היא נכשלת בגלל חריג. אם הפעולות של retryAttempts לא יבוצעו בהצלחה, תוצג השגיאה DeviceNotResponsiveException.

זריקות
DeviceNotAvailableException אם החיבור למכשיר אבד ולא ניתן לשחזר אותו

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

הפעלת פקודת מעטפת adb נתונה, עם simpleperf שמקיפה אותה

הקריאה היא האחראית לנתח את התוצאה של simpleperf דרך המכשיר המקבל

פרמטרים
command String: הפקודה להרצה במכשיר

receiver IShellOutputReceiver: אובייקט IShellOutputReceiver להפניית הפלט של המעטפת אל

זריקות
DeviceNotAvailableException אם החיבור למכשיר אבד ולא ניתן לשחזר אותו

getArgumentList

public  getArgumentList ()

אחזור ארגומנט לפקודה simpleperf

החזרות
רשימה של פקודות משנה וארגומנטים (יכולה להיות null)

newInstance

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

ה-constructor של 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