Đơn GiảnPerfUtil
public class SimplePerfUtil
extends Object
java.lang.Object |
↳ | com.android.tradefed.util.SimplePerfUtil |
Lớp tiện ích để gửi lệnh đơn giản và thu thập kết quả
Bản tóm tắt
Phương thức công khai |
---|
SimplePerfResult | executeCommand (String command) Thực thi lệnh adb shell đã cho, với simpleperf bao quanh Kết quả Simpleperf sẽ được phân tích cú pháp và trả lại cho người gọi |
void | executeCommand (String command, IShellOutputReceiver receiver, long maxTimeToOutputShellResponse, TimeUnit timeUnit, int retryAttempts) Thực thi lệnh adb shell đã cho, với simpleperf bao quanh Người gọi có trách nhiệm phân tích kết quả Simpleperf thông qua người nhận |
void | executeCommand (String command, IShellOutputReceiver receiver) Thực thi lệnh adb shell đã cho, với simpleperf bao quanh Người gọi có trách nhiệm phân tích kết quả Simpleperf thông qua người nhận |
| getArgumentList () Nhận đối số cho lệnh simpleperf |
static SimplePerfUtil | newInstance ( ITestDevice device, SimplePerfUtil.SimplePerfType type) Trình tạo SimplePerfUtil Người gọi phải xác định thiết bị và loại đơn giản khi khởi tạo phiên bản |
void | setArgumentList ( arguList) setArgumentList ( arguList) Đặt đối số trên lệnh simpleperf |
Phương thức công khai
thực thiCommand
public SimplePerfResult executeCommand (String command)
Thực thi lệnh adb shell đã cho, với simpleperf bao quanh
Kết quả Simpleperf sẽ được phân tích cú pháp và trả lại cho người gọi
Thông số |
---|
command | String : lệnh để chạy trên thiết bị |
thực thiCommand
public void executeCommand (String command,
IShellOutputReceiver receiver,
long maxTimeToOutputShellResponse,
TimeUnit timeUnit,
int retryAttempts)
Thực thi lệnh adb shell đã cho, với simpleperf bao quanh
Người gọi có trách nhiệm phân tích kết quả Simpleperf thông qua người nhận
Thông số |
---|
command | String : lệnh để chạy trên thiết bị |
receiver | IShellOutputReceiver : Đối tượng IShellOutputReceiver để hướng đầu ra của shell tới |
maxTimeToOutputShellResponse | long : lượng thời gian tối đa mà lệnh được phép không đưa ra bất kỳ phản hồi nào; đơn vị như được chỉ định trong timeUnit |
timeUnit | TimeUnit : đơn vị timeUnit cho maxTimeToOutputShellResponse , xem ERROR(/TimeUnit) |
retryAttempts | int : số lần tối đa để thử lại lệnh nếu nó không thành công do một ngoại lệ. DeviceNotResponsiveException sẽ bị ném nếu retryAttempts được thực hiện không thành công. |
thực thiCommand
public void executeCommand (String command,
IShellOutputReceiver receiver)
Thực thi lệnh adb shell đã cho, với simpleperf bao quanh
Người gọi có trách nhiệm phân tích kết quả Simpleperf thông qua người nhận
Thông số |
---|
command | String : lệnh để chạy trên thiết bị |
receiver | IShellOutputReceiver : Đối tượng IShellOutputReceiver để hướng đầu ra của shell tới |
getArgumentList
public getArgumentList ()
Nhận đối số cho lệnh simpleperf
trả lại |
---|
| danh sách lệnh con và đối số (nullable) |
setArgumentList
public void setArgumentList ( arguList)
Đặt đối số trên lệnh simpleperf
Thông số |
---|
arguList | : danh sách lệnh con và đối số |
phương pháp được bảo vệ
commandStringPreparer
protected String commandStringPreparer (String command)