REST Resource: projects.histories.executions.steps.perfMetricsSummary

资源:PerfMetricsSummary

收集的性能指标和性能环境信息的摘要

JSON 表示
{
  "projectId": string,
  "historyId": string,
  "executionId": string,
  "stepId": string,
  "perfMetrics": [
    enum (PerfMetricType)
  ],
  "perfEnvironment": {
    object (PerfEnvironment)
  },
  "appStartTime": {
    object (AppStartTime)
  },
  "graphicsStats": {
    object (GraphicsStats)
  }
}
领域
projectId

string

云项目

注意:该字段仅在响应中使用。请求中指定的任何值都将被忽略。

historyId

string

工具结果历史 ID。

注意:该字段仅在响应中使用。请求中指定的任何值都将被忽略。

executionId

string

工具结果执行 ID。

注意:该字段仅在响应中使用。请求中指定的任何值都将被忽略。

stepId

string

工具结果步骤 ID。

注意:该字段仅在响应中使用。请求中指定的任何值都将被忽略。

perfMetrics[]

enum ( PerfMetricType )

收集的资源集

perfEnvironment

object ( PerfEnvironment )

描述收集性能指标的环境

appStartTime

object ( AppStartTime )

graphicsStats

object ( GraphicsStats )

整个运行的图形统计。统计数据在运行开始时重置并在运行结束时收集。

性能环境

封装性能环境信息

JSON 表示
{
  "cpuInfo": {
    object (CPUInfo)
  },
  "memoryInfo": {
    object (MemoryInfo)
  }
}
领域
cpuInfo

object ( CPUInfo )

CPU相关环境信息

memoryInfo

object ( MemoryInfo )

内存相关环境信息

CPU信息

JSON 表示
{
  "cpuProcessor": string,
  "cpuSpeedInGhz": number,
  "numberOfCores": integer
}
领域
cpuProcessor

string

设备处理器的描述,即“1.8 GHz 六核 64 位 ARMv8-A”

cpuSpeedInGhz

number

CPU 时钟速度(GHz)

numberOfCores

integer

CPU核心数

内存信息

JSON 表示
{
  "memoryTotalInKibibyte": string,
  "memoryCapInKibibyte": string
}
领域
memoryTotalInKibibyte

string ( int64 format)

设备上可用的总内存(以 KiB 为单位)

memoryCapInKibibyte

string ( int64 format)

可以分配给进程的最大内存(以 KiB 为单位)

应用程序启动时间

JSON 表示
{
  "initialDisplayTime": {
    object (Duration)
  },
  "fullyDrawnTime": {
    object (Duration)
  }
}
领域
initialDisplayTime

object ( Duration )

从应用程序启动到绘制第一个显示的 Activity 的时间,如 Logcat 中报告的那样。请参阅https://developer.android.com/topic/performance/launch-time.html#time-initial

fullyDrawnTime

object ( Duration )

选修的。从应用程序启动到达到开发人员报告的“完全绘制”时间的时间。仅当应用程序包含对 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 (Bucket)
    }
  ]
}
领域
totalFrames

string ( int64 format)

由包渲染的总帧数。

jankyFrames

string ( int64 format)

渲染时间较慢的总帧数。应 <= 总帧数。

p50Millis

string ( int64 format)

第 50 个百分位帧渲染时间(以毫秒为单位)。

p90Millis

string ( int64 format)

第 90 个百分位数的帧渲染时间(以毫秒为单位)。

p95Millis

string ( int64 format)

第 95 个百分点的帧渲染时间(以毫秒为单位)。

p99Millis

string ( int64 format)

第 99 个百分位帧渲染时间(以毫秒为单位)。

missedVsyncCount

string ( int64 format)

“错过垂直同步”事件总数。

highInputLatencyCount

string ( int64 format)

“高输入延迟”事件总数。

slowUiThreadCount

string ( int64 format)

“缓慢的 UI 线程”事件总数。

slowBitmapUploadCount

string ( int64 format)

“位图上传缓慢”事件总数。

slowDrawCount

string ( int64 format)

“缓慢绘制”事件总数。

buckets[]

object ( Bucket )

帧渲染时间的直方图。应该有 154 个桶,范围从 [5ms, 6ms) 到 [4950ms, 无穷大)

JSON 表示
{
  "renderMillis": string,
  "frameCount": string
}
领域
renderMillis

string ( int64 format)

渲染时间的下限(以毫秒为单位)。

frameCount

string ( int64 format)

桶中的帧数。

方法

create

创建 PerfMetricsSummary 资源。