リソースメトリック使用率

public class ResourceMetricUtil
extends Object

java.lang.オブジェクト
com.android.tradefed.monitoring.collector.ResourceMetricUtil


メトリクスを構成するためのユーティリティ関数。

まとめ

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

ResourceMetricUtil ()

パブリックメソッド

static float ConvertedMetricValue (String original, float conversionDivisor)

メトリック値をさまざまな単位に変換し、出力値をフォーマットします。

static GetCommandResponse ( IDeviceManager deviceManager, String serial, String cmd, long timeoutMs)

adb コマンドを実行し、成功すると応答を返します。

static Timestamp GetCurrentTimestamp ()

システム UTC クロックから現在のタイムスタンプを取得します。

static float RoundedMetricValue (String original)

メトリック値を解析してフォーマットします。

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

リソースメトリック使用率

public ResourceMetricUtil ()

パブリックメソッド

変換されたメトリック値

public static float ConvertedMetricValue (String original, 
                float conversionDivisor)

メトリック値をさまざまな単位に変換し、出力値をフォーマットします。

パラメーター
original String : 元の値の文字列。

conversionDivisor float : 単位変換の約数。

戻り値
float出力浮動小数点値。

投げる
NumberFormatException元の文字列が null の場合。

GetCommandResponse

public static  GetCommandResponse (IDeviceManager deviceManager, 
                String serial, 
                String cmd, 
                long timeoutMs)

adb コマンドを実行し、成功すると応答を返します。

パラメーター
deviceManager IDeviceManager : 「利用可能な」デバイス上でコマンドを実行するための IDeviceManager インスタンス。

serial String : デバイスのシリアル。

cmd String : コマンド文字列。

timeoutMs long : ミリ秒単位の待機時間。

戻り値
CommandResultインスタンス。

GetCurrentTimestamp

public static Timestamp GetCurrentTimestamp ()

システム UTC クロックから現在のタイムスタンプを取得します。

戻り値
Timestamp

RoundedMetricValue

public static float RoundedMetricValue (String original)

メトリック値を解析してフォーマットします。

パラメーター
original String : 元の値の文字列。

戻り値
float出力浮動小数点値。

投げる
NumberFormatException元の文字列が null の場合。