SimplePerfUtil

public class SimplePerfUtil
extends Object

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


מחלקת כלי עזר לשליחת פקודה פשוטה ולאיסוף תוצאות

מידע נוסף:

סיכום

‫methods ציבוריים

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

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

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

SimplePerfResult executeCommand(String command)

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

התוצאה של Simpleperf תנותח ותוחזר למתקשר

void executeCommand(String command, IShellOutputReceiver receiver)

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

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

List<String> getArgumentList()

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

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

SimplePerfUtil Constructor

המתקשר צריך להגדיר את סוג המכשיר וה-simpleperf כשמפעילים את המופע

void setArgumentList(List<String> arguList)

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

שיטות מוגנות

String commandStringPreparer(String command)

‫methods ציבוריים

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: יחידת timeUnit עבור maxTimeToOutputShellResponse, ראו TimeUnit

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

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException אם החיבור למכשיר אבד ואי אפשר לשחזר אותו

executeCommand

public SimplePerfResult executeCommand (String command)

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

התוצאה של Simpleperf תנותח ותוחזר למתקשר

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

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

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException אם החיבור למכשיר אבד ואי אפשר לשחזר אותו

executeCommand

public void executeCommand (String command, 
                IShellOutputReceiver receiver)

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

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

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

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

הקפצת הודעות שגיאה (throw)
DeviceNotAvailableException אם החיבור למכשיר אבד ואי אפשר לשחזר אותו

getArgumentList

public List<String> getArgumentList ()

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

החזרות
List<String> רשימה של פקודות משנה וארגומנטים (אפשר להשאיר ריק)

newInstance

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

SimplePerfUtil Constructor

המתקשר צריך להגדיר את סוג המכשיר וה-simpleperf כשמפעילים את המופע

פרמטרים
device ‫ITestDevice: ITestDevice מכשיר בדיקה

type ‫SimplePerfUtil.SimplePerfType: SimplePerfType מציין את מצב simpleperf

החזרות
SimplePerfUtil מופע חדש של SimplePerfUtil

הקפצת הודעות שגיאה (throw)
NullPointerException

setArgumentList

public void setArgumentList (List<String> arguList)

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

פרמטרים
arguList ‫List: רשימה של פקודות משנה וארגומנטים

שיטות מוגנות

commandStringPreparer

protected String commandStringPreparer (String command)

פרמטרים
command String

חזרה לרצף השגרה
String