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)
ตัวสร้าง SimplePerfUtil ผู้เรียกต้องกําหนดประเภทอุปกรณ์และ SimplePerf เมื่อเริ่มต้นอินสแตนซ์ |
void
|
setArgumentList(
ตั้งค่าอาร์กิวเมนต์ในคําสั่ง 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: จำนวนครั้งสูงสุดในการลองใช้คำสั่งอีกครั้งหากดำเนินการไม่สำเร็จเนื่องจากมีข้อยกเว้น ระบบจะแสดง DeviceNotResponsiveException หากดำเนินการ retryAttempts ไม่สำเร็จ |
| การโยน | |
|---|---|
DeviceNotAvailableException |
หากการเชื่อมต่อกับอุปกรณ์ขาดหายไปและกู้คืนไม่ได้ |
executeCommand
public void executeCommand (String command,
IShellOutputReceiver receiver)เรียกใช้คำสั่งเชลล์ adb ที่ระบุโดยรวม simpleperf ไว้ด้วย
ผู้เรียกมีหน้าที่รับผิดชอบในการแยกวิเคราะห์ผลลัพธ์ simpleperf ผ่านตัวรับ
| พารามิเตอร์ | |
|---|---|
command |
String: คำสั่งที่จะเรียกใช้บนอุปกรณ์ |
receiver |
IShellOutputReceiver: IShellOutputReceiver ออบเจ็กต์สำหรับส่งเอาต์พุตเชลล์โดยตรง |
| การโยน | |
|---|---|
DeviceNotAvailableException |
หากการเชื่อมต่อกับอุปกรณ์ขาดหายไปและกู้คืนไม่ได้ |
getArgumentList
publicgetArgumentList ()
รับอาร์กิวเมนต์สําหรับคําสั่ง 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 |
|