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


デバイスから perfetto ファイルをプルしてメトリックを収集できるようにするFilePullerDeviceMetricCollectorの基本実装。生のトレース ファイルを perfetto メトリック ファイルに変換するためにも使用されます。

まとめ

パブリック コンストラクター

PerfettoPullerMetricCollector ()

公開メソッド

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

メソッドの実装により、ディレクトリをログに記録し、それを解析してメトリクスをDeviceMetricDataに配置できるようにする必要があります。

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

追加メトリックの perfetto トレース ファイルを処理し、最終的なメトリックに追加します。

保護されたメソッド

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

デバイス内の指定されたパスからファイルをプルします。

パブリック コンストラクター

PerfettoPullerMetricCollector

public PerfettoPullerMetricCollector ()

公開メソッド

プロセスメトリックディレクトリ

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

メソッドの実装により、ディレクトリをログに記録し、それを解析してメトリクスをDeviceMetricDataに配置できるようにする必要があります。

パラメーター
key String : プルされたディレクトリに関連付けられたオプション キー。

metricDirectory File : オプション キーに一致するデバイスから取得されたERROR(/File)

runData DeviceMetricData : メトリックを格納できるDeviceMetricData

processMetricFile

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

追加メトリックの perfetto トレース ファイルを処理し、最終的なメトリックに追加します。圧縮が有効になっている場合は、処理のために perfetto ファイルを解凍します。

パラメーター
key String : デバイスからプルされたファイルに関連付けられたオプション キー。

metricFile File : オプション キーに一致するデバイスから取得されたERROR(/File)

data DeviceMetricData : メトリックが格納される場所。

保護されたメソッド

検索ファイル

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

デバイス内の指定されたパスからファイルをプルします。圧縮 perfetto オプションが有効になっている場合は、perfetto ファイルの圧縮されたコンテンツをプルします。

パラメーター
device ITestDevice : ファイルが含まれています。

remoteFilePath String : デバイス内の場所。

userId int : プル元のユーザー ID

戻り値
File mCompressPerfetto オプションに基づく perfetto ファイルの圧縮または解凍バージョンが設定されているかどうか。

スロー
com.android.tradefed.device.DeviceNotAvailableException
DeviceNotAvailableException