本文件說明 Fuchsia 基準結果必須遵循的 JSON 結構定義,才能上傳至效能資訊主頁。
JSON 說明
[
{
"label": string // Name of the test case in the performance dashboard.
"test_suite": string // Name of the test suite in the performance dashboard.
"unit": string // One of the supported units (see below)
"values": [v1, v2..] // Numeric values collected in this test case
},
{
...
}
]
支援的單位
如要將基準結果轉換為效能資訊主頁要求的格式,unit
必須是下列任一字串,用來描述結果的 values
單位。
- 「
nanoseconds
」或「ns
」 milliseconds
或ms
bytes/second
bytes
範例
[
{
"label": "Channel/WriteRead/64bytes",
"test_suite": "fuchsia.microbenchmarks",
"unit": "nanoseconds",
"values": [105.45, 697.916667, 672.743056]
},
{
"label": "Channel/WriteRead/1024bytes",
"test_suite": "fuchsia.microbenchmarks",
"unit": "nanoseconds",
"values": [102.23, 1004.340278, 906.250000]
}
]
另請參閱
- Fuchsiaperf 生產者:用於產生
fuchsiaperf
檔案的程式庫。 - Fuchsiaperf 使用者:使用
fuchsiaperf
檔案的系統。