ตั้งแต่ปี 2026 เป็นต้นไป เราจะเผยแพร่ซอร์สโค้ดไปยัง AOSP ในไตรมาสที่ 2 และ 4 เพื่อให้สอดคล้องกับโมเดลการพัฒนาที่เสถียรของ Trunk และรับประกันความเสถียรของแพลตฟอร์มสำหรับระบบนิเวศ เราขอแนะนำให้ใช้ android-latest-release แทน aosp-main ในการสร้างและมีส่วนร่วมใน AOSP android-latest-release สาขาไฟล์ Manifest จะอ้างอิงถึงรุ่นล่าสุดที่พุชไปยัง AOSP เสมอ ดูข้อมูลเพิ่มเติมได้ที่การเปลี่ยนแปลงใน AOSP
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
TfMetricProtoUtil
public
class
TfMetricProtoUtil
extends Object
| java.lang.Object
|
| ↳ |
com.android.tradefed.util.proto.TfMetricProtoUtil
|
คลาสยูทิลิตีเพื่อช่วยในการเปลี่ยนจาก Map<string, string=""> เป็น Map<string, metric=""></string,></string,>
สรุป
เมธอดสาธารณะ |
static
|
compatibleConvert( map)
การแปลง Map<string, metric=""> เป็น Map<string, string="">
</string,></string,>
|
static
MetricMeasurement.Metric
|
doubleArrayToMetric( metric)
แปลงรายการของ Double เป็น Metric
|
static
MetricMeasurement.Metric
|
doubleToMetric(Double metric)
แปลงเมตริก Double อย่างง่ายเป็น Metric
|
static
MetricMeasurement.Metric
|
numericArrayToMetric( metric)
แปลงรายการตัวเลข (int64) เป็น Metric
|
static
MetricMeasurement.Metric
|
numericToMetric(long value, String unit)
สร้าง Metric สำหรับค่า long/int รายการเดียว และระบุหน่วย (ไม่บังคับ)
|
static
MetricMeasurement.Metric
|
numericToMetric(Long metric)
แปลงเมตริกตัวเลขอย่างง่ายเป็น Metric
|
static
MetricMeasurement.Metric
|
stringArrayToMetric( metric)
แปลงรายการสตริงเป็น Metric
|
static
MetricMeasurement.Metric
|
stringToMetric(String metric)
แปลงเมตริก String อย่างง่าย (รูปแบบเก่า) เป็น Metric (รูปแบบใหม่)
|
static
|
upgradeConvert( metrics)
การแปลงจาก Map<string, string=""> เป็น HashMap<string, metric="">
</string,></string,>
|
static
|
upgradeConvert( metrics, boolean smartNumbers)
การแปลงจาก Map<string, string=""> เป็น HashMap<string, metric="">
</string,></string,>
|
เครื่องมือสร้างสาธารณะ
TfMetricProtoUtil
public TfMetricProtoUtil ()
เมธอดสาธารณะ
compatibleConvert
public static compatibleConvert ( map)
การแปลง Map<string, metric=""> เป็น Map<string, string=""></string,></string,>
doubleArrayToMetric
public static MetricMeasurement.Metric doubleArrayToMetric ( metric)
แปลงรายการของ Double เป็น Metric
| พารามิเตอร์ |
metric |
: รายการที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
doubleToMetric
public static MetricMeasurement.Metric doubleToMetric (Double metric)
แปลงเมตริก Double อย่างง่ายเป็น Metric
| พารามิเตอร์ |
metric |
Double: Double ที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
numericArrayToMetric
public static MetricMeasurement.Metric numericArrayToMetric ( metric)
แปลงรายการตัวเลข (int64) เป็น Metric
| พารามิเตอร์ |
metric |
: รายการที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
numericToMetric
public static MetricMeasurement.Metric numericToMetric (long value,
String unit)
สร้าง Metric สำหรับค่า long/int รายการเดียว และระบุหน่วย (ไม่บังคับ)
| พารามิเตอร์ |
value |
long: ค่าที่จะจัดเก็บ |
unit |
String: หน่วยของค่า หรือ null หากไม่มีหน่วย |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่มีข้อมูล |
numericToMetric
public static MetricMeasurement.Metric numericToMetric (Long metric)
แปลงเมตริกตัวเลขอย่างง่ายเป็น Metric
| พารามิเตอร์ |
metric |
Long: Double ที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
stringArrayToMetric
public static MetricMeasurement.Metric stringArrayToMetric ( metric)
แปลงรายการสตริงเป็น Metric
| พารามิเตอร์ |
metric |
: รายการที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
stringToMetric
public static MetricMeasurement.Metric stringToMetric (String metric)
แปลงเมตริก String อย่างง่าย (รูปแบบเก่า) เป็น Metric (รูปแบบใหม่)
| พารามิเตอร์ |
metric |
String: สตริงที่มีเมตริก |
| คิกรีเทิร์น |
MetricMeasurement.Metric |
Metric ที่สร้างขึ้น |
upgradeConvert
public static upgradeConvert ( metrics)
Conversion จาก Map<string, string=""> เป็น HashMap<string, metric=""> เพื่อไปยังอินเทอร์เฟซใหม่
ข้อมูลอาจได้รับการป้อนบางส่วนเท่านั้นเนื่องจากข้อจำกัดของรูปแบบเดิม</string,></string,>
upgradeConvert
public static upgradeConvert ( metrics,
boolean smartNumbers)
Conversion จาก Map<string, string=""> เป็น HashMap<string, metric=""> เพื่อไปยังอินเทอร์เฟซใหม่
ข้อมูลอาจได้รับการป้อนบางส่วนเท่านั้นเนื่องจากข้อจำกัดของรูปแบบเดิม</string,></string,>
| พารามิเตอร์ |
metrics |
|
smartNumbers |
boolean: แปลงตัวเลขเป็นเมตริกจำนวนเต็ม |
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-12-04 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-12-04 UTC"],[],[]]