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