PerfettoPullerMetricCollector

public class PerfettoPullerMetricCollector
extends FilePullerDeviceMetricCollector

java.lang.Object
com.android.tradefed.device.metric.BaseDeviceMetricCollector
com.android.tradefed.device.metric.FilePullerDeviceMetricCollector
com.android.tradefed.device.metric.PerfettoPullerMetricCollector


Triển khai cơ sở FilePullerDeviceMetricCollector cho phép kéo các tệp perfetto khỏi thiết bị và thu thập số liệu từ thiết bị. Cũng được sử dụng để chuyển đổi tệp theo dõi thô thành tệp số liệu perfetto.

Bản tóm tắt

Nhà thầu xây dựng công cộng

PerfettoPullerMetricCollector ()

Phương pháp công cộng

void processMetricDirectory (String key, File metricDirectory, DeviceMetricData runData)

Việc triển khai phương pháp này sẽ cho phép ghi nhật ký thư mục, phân tích cú pháp để đưa số liệu vào DeviceMetricData .

void processMetricFile (String key, File metricFile, DeviceMetricData data)

Xử lý tệp theo dõi perfetto cho các số liệu bổ sung và thêm nó vào số liệu cuối cùng.

Phương pháp được bảo vệ

File retrieveFile ( ITestDevice device, String remoteFilePath, int userId)

Kéo tệp từ đường dẫn được chỉ định trong thiết bị.

Nhà thầu xây dựng công cộng

PerfettoPullerMetricCollector

public PerfettoPullerMetricCollector ()

Phương pháp công cộng

quá trìnhMetricDirectory

public void processMetricDirectory (String key, 
                File metricDirectory, 
                DeviceMetricData runData)

Việc triển khai phương pháp này sẽ cho phép ghi nhật ký thư mục, phân tích cú pháp để đưa số liệu vào DeviceMetricData .

Thông số
key String : khóa tùy chọn liên quan đến thư mục được kéo.

metricDirectory File : ERROR(/File) được lấy từ thiết bị khớp với phím tùy chọn.

runData DeviceMetricData : DeviceMetricData nơi số liệu có thể được lưu trữ.

quá trìnhMetricFile

public void processMetricFile (String key, 
                File metricFile, 
                DeviceMetricData data)

Xử lý tệp theo dõi perfetto cho các số liệu bổ sung và thêm nó vào số liệu cuối cùng. Giải nén tệp perfetto để xử lý nếu tính năng nén được bật.

Thông số
key String : khóa tùy chọn liên quan đến tệp được lấy từ thiết bị.

metricFile File : ERROR(/File) được lấy từ thiết bị khớp với phím tùy chọn.

data DeviceMetricData : nơi số liệu sẽ được lưu trữ.

Phương pháp được bảo vệ

lấy tập tin

protected File retrieveFile (ITestDevice device, 
                String remoteFilePath, 
                int userId)

Kéo tệp từ đường dẫn được chỉ định trong thiết bị. Kéo nội dung nén của tệp perfetto nếu tùy chọn nén perfetto được bật.

Thông số
device ITestDevice : có tệp.

remoteFilePath String : vị trí trong thiết bị.

userId int : id người dùng cần lấy từ

Trả lại
File phiên bản nén hoặc giải nén của tệp perfetto dựa trên tùy chọn mCompressPerfetto có được đặt hay không.

Ném
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException