資源:PerfMetricsSummary
收集的性能指標和性能環境資訊的摘要
JSON 表示 |
---|
{ "projectId": string, "historyId": string, "executionId": string, "stepId": string, "perfMetrics": [ enum ( |
領域 | |
---|---|
projectId | 雲端專案 注意:此欄位僅在回應中使用。請求中指定的任何值都將被忽略。 |
historyId | 工具結果歷史 ID。 注意:此欄位僅在回應中使用。請求中指定的任何值都將被忽略。 |
executionId | 工具結果執行 ID。 注意:此欄位僅在回應中使用。請求中指定的任何值都將被忽略。 |
stepId | 工具結果步驟 ID。 注意:此欄位僅在回應中使用。請求中指定的任何值都將被忽略。 |
perfMetrics[] | 收集的資源集 |
perfEnvironment | 描述收集性能指標的環境 |
appStartTime | |
graphicsStats | 整個運行的圖形統計。統計資料在運行開始時重置並在運行結束時收集。 |
效能環境
封裝性能環境資訊
JSON 表示 |
---|
{ "cpuInfo": { object ( |
領域 | |
---|---|
cpuInfo | CPU相關環境資訊 |
memoryInfo | 記憶體相關環境資訊 |
CPU資訊
JSON 表示 |
---|
{ "cpuProcessor": string, "cpuSpeedInGhz": number, "numberOfCores": integer } |
領域 | |
---|---|
cpuProcessor | 裝置處理器的描述,即“1.8 GHz 六核心 64 位元 ARMv8-A” |
cpuSpeedInGhz | CPU 時脈速度(GHz) |
numberOfCores | CPU核心數 |
記憶體資訊
JSON 表示 |
---|
{ "memoryTotalInKibibyte": string, "memoryCapInKibibyte": string } |
領域 | |
---|---|
memoryTotalInKibibyte | 裝置上可用的總記憶體(以 KiB 為單位) |
memoryCapInKibibyte | 可以分配給進程的最大記憶體(以 KiB 為單位) |
應用程式啟動時間
JSON 表示 |
---|
{ "initialDisplayTime": { object ( |
領域 | |
---|---|
initialDisplayTime | 從應用程式啟動到繪製第一個顯示的 Activity 的時間,如 Logcat 中報告的那樣。請參閱https://developer.android.com/topic/performance/launch-time.html#time-initial |
fullyDrawnTime | 選修的。從應用程式啟動到達到開發人員報告的「完全繪製」時間的時間。只有當應用程式包含對 Activity.reportFullyDrawn() 的呼叫時才會儲存此資訊。請參閱https://developer.android.com/topic/performance/launch-time.html#time-full |
圖形統計
應用程式的圖形統計。該資訊是從「adb shell dumpsys Graphicsstats」收集的。有關更多信息,請參閱: https://developer.android.com/training/testing/performance.html統計資訊僅適用於 API 23+。
JSON 表示 |
---|
{
"totalFrames": string,
"jankyFrames": string,
"p50Millis": string,
"p90Millis": string,
"p95Millis": string,
"p99Millis": string,
"missedVsyncCount": string,
"highInputLatencyCount": string,
"slowUiThreadCount": string,
"slowBitmapUploadCount": string,
"slowDrawCount": string,
"buckets": [
{
object ( |
領域 | |
---|---|
totalFrames | 由包渲染的總幀數。 |
jankyFrames | 渲染時間較慢的總幀數。應 <= 總幀數。 |
p50Millis | 第 50 個百分位幀渲染時間(以毫秒為單位)。 |
p90Millis | 第 90 個百分位數的幀渲染時間(以毫秒為單位)。 |
p95Millis | 第 95 個百分點的幀渲染時間(以毫秒為單位)。 |
p99Millis | 第 99 個百分位數的幀渲染時間(以毫秒為單位)。 |
missedVsyncCount | “錯過垂直同步”事件總數。 |
highInputLatencyCount | “高輸入延遲”事件總數。 |
slowUiThreadCount | “緩慢的 UI 執行緒”事件總數。 |
slowBitmapUploadCount | “點陣圖上傳緩慢”事件總數。 |
slowDrawCount | “緩慢繪製”事件總數。 |
buckets[] | 幀渲染時間的直方圖。應該有 154 個桶,範圍從 [5ms, 6ms) 到 [4950ms, 無窮大) |
桶
JSON 表示 |
---|
{ "renderMillis": string, "frameCount": string } |
領域 | |
---|---|
renderMillis | 渲染時間的下限(以毫秒為單位)。 |
frameCount | 桶中的幀數。 |
方法 | |
---|---|
| 建立 PerfMetricsSummary 資源。 |