1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="toolresults_v1beta3.html">Cloud Tool Results API</a> . <a href="toolresults_v1beta3.projects.html">projects</a> . <a href="toolresults_v1beta3.projects.histories.html">histories</a> . <a href="toolresults_v1beta3.projects.histories.executions.html">executions</a> . <a href="toolresults_v1beta3.projects.histories.executions.steps.html">steps</a> . <a href="toolresults_v1beta3.projects.histories.executions.steps.perfMetricsSummary.html">perfMetricsSummary</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#create">create(projectId, historyId, executionId, stepId, body)</a></code></p> 79<p class="firstline">Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created.</p> 80<h3>Method Details</h3> 81<div class="method"> 82 <code class="details" id="create">create(projectId, historyId, executionId, stepId, body)</code> 83 <pre>Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created. 84 85May return any of the following error code(s): - NOT_FOUND - The containing Step does not exist 86 87Args: 88 projectId: string, The cloud project (required) 89 historyId: string, A tool results history ID. (required) 90 executionId: string, A tool results execution ID. (required) 91 stepId: string, A tool results step ID. (required) 92 body: object, The request body. (required) 93 The object takes the form of: 94 95{ # A summary of perf metrics collected and performance environment info 96 "stepId": "A String", # A tool results step ID. 97 "projectId": "A String", # The cloud project 98 "perfEnvironment": { # Encapsulates performance environment info # Describes the environment in which the performance metrics were collected 99 "cpuInfo": { # CPU related environment info 100 "cpuSpeedInGhz": 3.14, # the CPU clock speed in GHz 101 "cpuProcessor": "A String", # description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A' 102 "numberOfCores": 42, # the number of CPU cores 103 }, 104 "memoryInfo": { # Memory related environment info 105 "memoryTotalInKibibyte": "A String", # Total memory available on the device in KiB 106 "memoryCapInKibibyte": "A String", # Maximum memory that can be allocated to the process in KiB 107 }, 108 }, 109 "appStartTime": { 110 "initialDisplayTime": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # The time from app start to the first displayed activity being drawn, as reported in Logcat. See https://developer.android.com/topic/performance/launch-time.html#time-initial 111 # 112 # # Examples 113 # 114 # Example 1: Compute Duration from two Timestamps in pseudo code. 115 # 116 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 117 # 118 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 119 # 120 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 121 # 122 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 123 # 124 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 125 # 126 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 127 # 128 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 129 # 130 # Example 3: Compute Duration from datetime.timedelta in Python. 131 # 132 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 133 # 134 # # JSON Mapping 135 # 136 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 137 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 138 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 139 }, 140 "fullyDrawnTime": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Optional. The time from app start to reaching the developer-reported "fully drawn" time. This is only stored if the app includes a call to Activity.reportFullyDrawn(). See https://developer.android.com/topic/performance/launch-time.html#time-full 141 # 142 # # Examples 143 # 144 # Example 1: Compute Duration from two Timestamps in pseudo code. 145 # 146 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 147 # 148 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 149 # 150 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 151 # 152 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 153 # 154 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 155 # 156 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 157 # 158 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 159 # 160 # Example 3: Compute Duration from datetime.timedelta in Python. 161 # 162 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 163 # 164 # # JSON Mapping 165 # 166 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 167 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 168 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 169 }, 170 }, 171 "historyId": "A String", # A tool results history ID. 172 "graphicsStats": { # Graphics statistics for the App. The information is collected from 'adb shell dumpsys graphicsstats'. For more info see: https://developer.android.com/training/testing/performance.html Statistics will only be present for API 23+. # Graphics statistics for the entire run. Statistics are reset at the beginning of the run and collected at the end of the run. 173 "missedVsyncCount": "A String", # Total "missed vsync" events. 174 "highInputLatencyCount": "A String", # Total "high input latency" events. 175 "jankyFrames": "A String", # Total frames with slow render time. Should be <= total_frames. 176 "buckets": [ # Histogram of frame render times. There should be 154 buckets ranging from [5ms, 6ms) to [4950ms, infinity) 177 { 178 "renderMillis": "A String", # Lower bound of render time in milliseconds. 179 "frameCount": "A String", # Number of frames in the bucket. 180 }, 181 ], 182 "slowBitmapUploadCount": "A String", # Total "slow bitmap upload" events. 183 "p90Millis": "A String", # 90th percentile frame render time in milliseconds. 184 "p99Millis": "A String", # 99th percentile frame render time in milliseconds. 185 "totalFrames": "A String", # Total frames rendered by package. 186 "p95Millis": "A String", # 95th percentile frame render time in milliseconds. 187 "slowUiThreadCount": "A String", # Total "slow UI thread" events. 188 "slowDrawCount": "A String", # Total "slow draw" events. 189 "p50Millis": "A String", # 50th percentile frame render time in milliseconds. 190 }, 191 "executionId": "A String", # A tool results execution ID. 192 "perfMetrics": [ # Set of resource collected 193 "A String", 194 ], 195} 196 197 198Returns: 199 An object of the form: 200 201 { # A summary of perf metrics collected and performance environment info 202 "stepId": "A String", # A tool results step ID. 203 "projectId": "A String", # The cloud project 204 "perfEnvironment": { # Encapsulates performance environment info # Describes the environment in which the performance metrics were collected 205 "cpuInfo": { # CPU related environment info 206 "cpuSpeedInGhz": 3.14, # the CPU clock speed in GHz 207 "cpuProcessor": "A String", # description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A' 208 "numberOfCores": 42, # the number of CPU cores 209 }, 210 "memoryInfo": { # Memory related environment info 211 "memoryTotalInKibibyte": "A String", # Total memory available on the device in KiB 212 "memoryCapInKibibyte": "A String", # Maximum memory that can be allocated to the process in KiB 213 }, 214 }, 215 "appStartTime": { 216 "initialDisplayTime": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # The time from app start to the first displayed activity being drawn, as reported in Logcat. See https://developer.android.com/topic/performance/launch-time.html#time-initial 217 # 218 # # Examples 219 # 220 # Example 1: Compute Duration from two Timestamps in pseudo code. 221 # 222 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 223 # 224 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 225 # 226 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 227 # 228 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 229 # 230 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 231 # 232 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 233 # 234 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 235 # 236 # Example 3: Compute Duration from datetime.timedelta in Python. 237 # 238 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 239 # 240 # # JSON Mapping 241 # 242 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 243 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 244 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 245 }, 246 "fullyDrawnTime": { # A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Optional. The time from app start to reaching the developer-reported "fully drawn" time. This is only stored if the app includes a call to Activity.reportFullyDrawn(). See https://developer.android.com/topic/performance/launch-time.html#time-full 247 # 248 # # Examples 249 # 250 # Example 1: Compute Duration from two Timestamps in pseudo code. 251 # 252 # Timestamp start = ...; Timestamp end = ...; Duration duration = ...; 253 # 254 # duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; 255 # 256 # if (duration.seconds 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (durations.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } 257 # 258 # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. 259 # 260 # Timestamp start = ...; Duration duration = ...; Timestamp end = ...; 261 # 262 # end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; 263 # 264 # if (end.nanos = 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } 265 # 266 # Example 3: Compute Duration from datetime.timedelta in Python. 267 # 268 # td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) 269 # 270 # # JSON Mapping 271 # 272 # In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix "s" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should be expressed in JSON format as "3.000000001s", and 3 seconds and 1 microsecond should be expressed in JSON format as "3.000001s". 273 "nanos": 42, # Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive. 274 "seconds": "A String", # Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years 275 }, 276 }, 277 "historyId": "A String", # A tool results history ID. 278 "graphicsStats": { # Graphics statistics for the App. The information is collected from 'adb shell dumpsys graphicsstats'. For more info see: https://developer.android.com/training/testing/performance.html Statistics will only be present for API 23+. # Graphics statistics for the entire run. Statistics are reset at the beginning of the run and collected at the end of the run. 279 "missedVsyncCount": "A String", # Total "missed vsync" events. 280 "highInputLatencyCount": "A String", # Total "high input latency" events. 281 "jankyFrames": "A String", # Total frames with slow render time. Should be <= total_frames. 282 "buckets": [ # Histogram of frame render times. There should be 154 buckets ranging from [5ms, 6ms) to [4950ms, infinity) 283 { 284 "renderMillis": "A String", # Lower bound of render time in milliseconds. 285 "frameCount": "A String", # Number of frames in the bucket. 286 }, 287 ], 288 "slowBitmapUploadCount": "A String", # Total "slow bitmap upload" events. 289 "p90Millis": "A String", # 90th percentile frame render time in milliseconds. 290 "p99Millis": "A String", # 99th percentile frame render time in milliseconds. 291 "totalFrames": "A String", # Total frames rendered by package. 292 "p95Millis": "A String", # 95th percentile frame render time in milliseconds. 293 "slowUiThreadCount": "A String", # Total "slow UI thread" events. 294 "slowDrawCount": "A String", # Total "slow draw" events. 295 "p50Millis": "A String", # 50th percentile frame render time in milliseconds. 296 }, 297 "executionId": "A String", # A tool results execution ID. 298 "perfMetrics": [ # Set of resource collected 299 "A String", 300 ], 301 }</pre> 302</div> 303 304</body></html>