资源: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 资源。 |