SimplePerfUtil
public
class
SimplePerfUtil
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.util.SimplePerfUtil |
คลาสยูทิลิตี้สำหรับส่งคำสั่งอย่างง่ายและรวบรวมผลลัพธ์
ดูเพิ่มเติม
สรุป
เมธอดสาธารณะ | |
|---|---|
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 ผู้เรียกต้องกำหนดอุปกรณ์และประเภท simpleperf เมื่อเริ่มต้นอินสแตนซ์ |
void
|
setArgumentList(List<String> arguList)
ตั้งค่าอาร์กิวเมนต์ในคำสั่ง simpleperf |
เมธอดที่ได้รับการปกป้อง | |
|---|---|
String
|
commandStringPreparer(String command)
|
เมธอดสาธารณะ
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 |
retryAttempts |
int: จำนวนครั้งสูงสุดที่จะลองคำสั่งอีกครั้งหากคำสั่งล้มเหลวเนื่องจากข้อยกเว้น
ระบบจะแสดง DeviceNotResponsiveException หากมีการลอง retryAttempts โดยไม่สำเร็จ
|
| ส่ง | |
|---|---|
DeviceNotAvailableException |
หากการเชื่อมต่อกับอุปกรณ์ขาดหายและกู้คืนไม่ได้ |
executeCommand
public SimplePerfResult executeCommand (String command)
เรียกใช้คำสั่ง adb shell ที่ระบุ โดยมี simpleperf เป็นตัวห่อหุ้ม
ระบบจะแยกวิเคราะห์ผลลัพธ์ของ simpleperf และส่งกลับไปยังผู้เรียก
| พารามิเตอร์ | |
|---|---|
command |
String: คำสั่งที่จะเรียกใช้ในอุปกรณ์ |
| การคืนสินค้า | |
|---|---|
SimplePerfResult |
ออบเจ็กต์ SimplePerfResult มีข้อมูลผลลัพธ์ทั้งหมด |
| ส่ง | |
|---|---|
DeviceNotAvailableException |
หากการเชื่อมต่อกับอุปกรณ์ขาดหายและกู้คืนไม่ได้ |
executeCommand
public void executeCommand (String command,
IShellOutputReceiver receiver)เรียกใช้คำสั่ง adb shell ที่ระบุ โดยมี simpleperf เป็นตัวห่อหุ้ม
ผู้เรียกมีหน้าที่ต้องแยกวิเคราะห์ผลลัพธ์ของ simpleperf ผ่านตัวรับ
| พารามิเตอร์ | |
|---|---|
command |
String: คำสั่งที่จะเรียกใช้ในอุปกรณ์ |
receiver |
IShellOutputReceiver: ออบเจ็กต์ IShellOutputReceiver เพื่อส่งเอาต์พุตของเชลล์ไปยัง |
| ส่ง | |
|---|---|
DeviceNotAvailableException |
หากการเชื่อมต่อกับอุปกรณ์ขาดหายและกู้คืนไม่ได้ |
getArgumentList
public List<String> getArgumentList ()
รับอาร์กิวเมนต์สำหรับคำสั่ง simpleperf
| การคืนสินค้า | |
|---|---|
List<String> |
รายการคำสั่งย่อยและอาร์กิวเมนต์ (อาจเป็น null) |
newInstance
public static SimplePerfUtil newInstance (ITestDevice device, SimplePerfUtil.SimplePerfType type)
ตัวสร้าง SimplePerfUtil
ผู้เรียกต้องกำหนดอุปกรณ์และประเภท simpleperf เมื่อเริ่มต้นอินสแตนซ์
| พารามิเตอร์ | |
|---|---|
device |
ITestDevice: อุปกรณ์ทดสอบ ITestDevice |
type |
SimplePerfUtil.SimplePerfType: SimplePerfType ระบุโหมด simpleperf |
| การคืนสินค้า | |
|---|---|
SimplePerfUtil |
อินสแตนซ์ SimplePerfUtil ที่สร้างขึ้นใหม่ |
| ส่ง | |
|---|---|
NullPointerException |
|
setArgumentList
public void setArgumentList (List<String> arguList)
ตั้งค่าอาร์กิวเมนต์ในคำสั่ง simpleperf
| พารามิเตอร์ | |
|---|---|
arguList |
List: รายการคำสั่งย่อยและอาร์กิวเมนต์ |
เมธอดที่ได้รับการปกป้อง
commandStringPreparer
protected String commandStringPreparer (String command)
| พารามิเตอร์ | |
|---|---|
command |
String |
| การคืนสินค้า | |
|---|---|
String |
|