• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_v1beta3firstparty.html">Cloud Tool Results firstparty API</a> . <a href="toolresults_v1beta3firstparty.projects.html">projects</a> . <a href="toolresults_v1beta3firstparty.projects.histories.html">histories</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.html">executions</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.html">steps</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.perfSampleSeries.html">perfSampleSeries</a> . <a href="toolresults_v1beta3firstparty.projects.histories.executions.steps.perfSampleSeries.samples.html">samples</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#batchCreate">batchCreate(projectId, historyId, executionId, stepId, sampleSeriesId, body)</a></code></p>
79<p class="firstline">Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).</p>
80<p class="toc_element">
81  <code><a href="#list">list(projectId, historyId, executionId, stepId, sampleSeriesId, pageSize=None, pageToken=None)</a></code></p>
82<p class="firstline">Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit</p>
83<p class="toc_element">
84  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<h3>Method Details</h3>
87<div class="method">
88    <code class="details" id="batchCreate">batchCreate(projectId, historyId, executionId, stepId, sampleSeriesId, body)</code>
89  <pre>Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database).
90
91May return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist
92
93Args:
94  projectId: string, The cloud project (required)
95  historyId: string, A tool results history ID. (required)
96  executionId: string, A tool results execution ID. (required)
97  stepId: string, A tool results step ID. (required)
98  sampleSeriesId: string, A sample series id (required)
99  body: object, The request body. (required)
100    The object takes the form of:
101
102{ # The request must provide up to a maximum of 5000 samples to be created; a larger sample size will cause an INVALID_ARGUMENT error
103    "perfSamples": [ # The set of PerfSamples to create should not include existing timestamps
104      { # Resource representing a single performance measure or data point
105        "sampleTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # Timestamp of collection
106            #
107            # # Examples
108            #
109            # Example 1: Compute Timestamp from POSIX `time()`.
110            #
111            # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);
112            #
113            # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
114            #
115            # struct timeval tv; gettimeofday(&tv, NULL);
116            #
117            # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);
118            #
119            # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
120            #
121            # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
122            #
123            # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
124            #
125            # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
126            #
127            # long millis = System.currentTimeMillis();
128            #
129            # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();
130            #
131            #
132            #
133            # Example 5: Compute Timestamp from current time in Python.
134            #
135            # timestamp = Timestamp() timestamp.GetCurrentTime()
136            #
137            # # JSON Mapping
138            #
139            # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported.
140            #
141            # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
142            #
143            # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format.
144          "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
145          "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
146        },
147        "value": 3.14, # Value observed
148      },
149    ],
150  }
151
152
153Returns:
154  An object of the form:
155
156    {
157    "perfSamples": [
158      { # Resource representing a single performance measure or data point
159        "sampleTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # Timestamp of collection
160            #
161            # # Examples
162            #
163            # Example 1: Compute Timestamp from POSIX `time()`.
164            #
165            # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);
166            #
167            # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
168            #
169            # struct timeval tv; gettimeofday(&tv, NULL);
170            #
171            # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);
172            #
173            # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
174            #
175            # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
176            #
177            # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
178            #
179            # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
180            #
181            # long millis = System.currentTimeMillis();
182            #
183            # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();
184            #
185            #
186            #
187            # Example 5: Compute Timestamp from current time in Python.
188            #
189            # timestamp = Timestamp() timestamp.GetCurrentTime()
190            #
191            # # JSON Mapping
192            #
193            # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported.
194            #
195            # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
196            #
197            # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format.
198          "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
199          "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
200        },
201        "value": 3.14, # Value observed
202      },
203    ],
204  }</pre>
205</div>
206
207<div class="method">
208    <code class="details" id="list">list(projectId, historyId, executionId, stepId, sampleSeriesId, pageSize=None, pageToken=None)</code>
209  <pre>Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit
210
211May return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist
212
213Args:
214  projectId: string, The cloud project (required)
215  historyId: string, A tool results history ID. (required)
216  executionId: string, A tool results execution ID. (required)
217  stepId: string, A tool results step ID. (required)
218  sampleSeriesId: string, A sample series id (required)
219  pageSize: integer, The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000
220  pageToken: string, Optional, the next_page_token returned in the previous response
221
222Returns:
223  An object of the form:
224
225    {
226    "nextPageToken": "A String", # Optional, returned if result size exceeds the page size specified in the request (or the default page size, 500, if unspecified). It indicates the last sample timestamp to be used as page_token in subsequent request
227    "perfSamples": [
228      { # Resource representing a single performance measure or data point
229        "sampleTime": { # A Timestamp represents a point in time independent of any time zone or calendar, represented as seconds and fractions of seconds at nanosecond resolution in UTC Epoch time. It is encoded using the Proleptic Gregorian Calendar which extends the Gregorian calendar backwards to year one. It is encoded assuming all minutes are 60 seconds long, i.e. leap seconds are "smeared" so that no leap second table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings. See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). # Timestamp of collection
230            #
231            # # Examples
232            #
233            # Example 1: Compute Timestamp from POSIX `time()`.
234            #
235            # Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0);
236            #
237            # Example 2: Compute Timestamp from POSIX `gettimeofday()`.
238            #
239            # struct timeval tv; gettimeofday(&tv, NULL);
240            #
241            # Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000);
242            #
243            # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
244            #
245            # FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
246            #
247            # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
248            #
249            # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
250            #
251            # long millis = System.currentTimeMillis();
252            #
253            # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build();
254            #
255            #
256            #
257            # Example 5: Compute Timestamp from current time in Python.
258            #
259            # timestamp = Timestamp() timestamp.GetCurrentTime()
260            #
261            # # JSON Mapping
262            #
263            # In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required, though only UTC (as indicated by "Z") is presently supported.
264            #
265            # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
266            #
267            # In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) to obtain a formatter capable of generating timestamps in this format.
268          "nanos": 42, # Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.
269          "seconds": "A String", # Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
270        },
271        "value": 3.14, # Value observed
272      },
273    ],
274  }</pre>
275</div>
276
277<div class="method">
278    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
279  <pre>Retrieves the next page of results.
280
281Args:
282  previous_request: The request for the previous page. (required)
283  previous_response: The response from the request for the previous page. (required)
284
285Returns:
286  A request object that you can call 'execute()' on to request the next
287  page. Returns None if there are no more items in the collection.
288    </pre>
289</div>
290
291</body></html>