ConfigUtil

public class ConfigUtil
extends Object

java.lang.Object
   ↳ com.android.tradefed.util.statsd.ConfigUtil


用於建立、互動及推送 statsd 設定檔的公用程式類別。

TODO(b/118635164):與裝置端設定公用程式合併。

摘要

公用建構函式

ConfigUtil()

公用方法

static long pushBinaryStatsConfig(ITestDevice device, File configFile)

將二進位 statsd 設定檔推送至收集指標

static long pushStatsConfig(ITestDevice device, List<Integer> eventAtomIds)

將以事件為準的設定檔推送至收集 eventAtomIds 中提供的原子。

static long pushStatsConfig(ITestDevice device, List<Integer> eventAtomIds, List<ConfigUtil.LogSource> logSources)

推送以事件為準的設定檔,收集 eventAtomIds 中提供的原子,來源為 logSources

static void removeConfig(ITestDevice device, long configId)

依 ID 移除 statsd 設定檔,configId

公用建構函式

ConfigUtil

public ConfigUtil ()

公用方法

pushBinaryStatsConfig

public static long pushBinaryStatsConfig (ITestDevice device, 
                File configFile)

推送二進位 statsd 設定檔,以收集指標

參數
device ITestDevice:要推送二進位 statsd 設定的測試裝置

configFile File:statsd 設定檔

傳回
long 新推送的設定檔 ID

擲回
DeviceNotAvailableException
IOException

pushStatsConfig

public static long pushStatsConfig (ITestDevice device, 
                List<Integer> eventAtomIds)

推送以事件為準的設定檔,收集 eventAtomIds 中提供的原子。

參數
device ITestDevice:要推送設定的位置

eventAtomIds List:要收集的事件原子 ID 清單

傳回
long 新推送的設定檔 ID

擲回
DeviceNotAvailableException
IOException

pushStatsConfig

public static long pushStatsConfig (ITestDevice device, 
                List<Integer> eventAtomIds, 
                List<ConfigUtil.LogSource> logSources)

推送以事件為準的設定檔,收集 eventAtomIds 中提供的原子,來源為 logSources

參數
device ITestDevice:要推送設定的位置

eventAtomIds List:要收集的事件原子 ID 清單

logSources List:可從中收集原子單位的記錄來源清單

傳回
long 新推送的設定檔 ID

擲回
DeviceNotAvailableException
IOException

removeConfig

public static void removeConfig (ITestDevice device, 
                long configId)

依 ID 移除 statsd 設定檔,configId

參數
device ITestDevice:要刪除設定的位置

configId long:要刪除的設定 ID

擲回
DeviceNotAvailableException