透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源度量工具
public class ResourceMetricUtil
extends Object
java.lang.Object |
↳ | com.android.tradefed.monitoring.collector.ResourceMetricUtil |
用於組成指標的實用函數。
概括
公共構造函數
資源度量工具
public ResourceMetricUtil ()
公共方法
轉換後的度量值
public static float ConvertedMetricValue (String original,
float conversionDivisor)
將指標值轉換為不同的單位並設定輸出值的格式。
參數 |
---|
original | String :原始值字串。 |
conversionDivisor | float :單位轉換的除數。 |
投擲 |
---|
NumberFormatException | 如果原始字串為空。 |
取得命令回應
public static GetCommandResponse (IDeviceManager deviceManager,
String serial,
String cmd,
long timeoutMs)
執行 adb 指令,如果成功則回傳回應。
參數 |
---|
deviceManager | IDeviceManager :用於在「可用」裝置上執行指令的 IDeviceManager 實例。 |
serial | String :裝置序號。 |
cmd | String :命令字串。 |
timeoutMs | long :等待時間(以毫秒為單位)。 |
取得當前時間戳
public static Timestamp GetCurrentTimestamp ()
從系統 UTC 時鐘取得目前時間戳記。
舍入度量值
public static float RoundedMetricValue (String original)
解析並格式化指標值。
參數 |
---|
original | String :原始值字串。 |
投擲 |
---|
NumberFormatException | 如果原始字串為空。 |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2023-12-01 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]