ConfigUtil

public class ConfigUtil
extends Object

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


Utility class for creating, interacting with, and pushing statsd configuration files.

TODO(b/118635164): Merge with device-side configuration utilities.

Summary

Public constructors

ConfigUtil()

Public methods

static long pushBinaryStatsConfig(ITestDevice device, File configFile)

Pushes a binary statsd configuration file to collect metrics

static long pushStatsConfig(ITestDevice device, eventAtomIds, logSources)

Pushes an event-based configuration file to collect atoms provided in eventAtomIds from logSources

static long pushStatsConfig(ITestDevice device, eventAtomIds)

Pushes an event-based configuration file to collect atoms provided in eventAtomIds.

static void removeConfig(ITestDevice device, long configId)

Removes a statsd configuration file by it's id, configId.

Public constructors

ConfigUtil

public ConfigUtil ()

Public methods

pushBinaryStatsConfig

public static long pushBinaryStatsConfig (ITestDevice device, 
                File configFile)

Pushes a binary statsd configuration file to collect metrics

Parameters
device ITestDevice: Test device where the binary statsd config will be pushed to

configFile File: The statsd config file

Returns
long ID of the newly pushed configuration file

Throws
DeviceNotAvailableException

pushStatsConfig

public static long pushStatsConfig (ITestDevice device, 
                 eventAtomIds, 
                 logSources)

Pushes an event-based configuration file to collect atoms provided in eventAtomIds from logSources

Parameters
device ITestDevice: where to push the configuration

eventAtomIds : a list of event atom IDs to collect

logSources : a list of log sources from where atoms can be collected

Returns
long ID of the newly pushed configuration file

Throws
DeviceNotAvailableException

pushStatsConfig

public static long pushStatsConfig (ITestDevice device, 
                 eventAtomIds)

Pushes an event-based configuration file to collect atoms provided in eventAtomIds.

Parameters
device ITestDevice: where to push the configuration

eventAtomIds : a list of event atom IDs to collect

Returns
long ID of the newly pushed configuration file

Throws
DeviceNotAvailableException

removeConfig

public static void removeConfig (ITestDevice device, 
                long configId)

Removes a statsd configuration file by it's id, configId.

Parameters
device ITestDevice: where to delete the configuration

configId long: ID of the configuration to delete

Throws
DeviceNotAvailableException