batchCreate(projectId, historyId, executionId, stepId, sampleSeriesId, body=None, x__xgafv=None)
Creates a batch of PerfSamples
Lists the Performance Samples of a given Sample Series
list_next(previous_request, previous_response)
Retrieves the next page of results.
batchCreate(projectId, historyId, executionId, stepId, sampleSeriesId, body=None, x__xgafv=None)
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).
May return any of the following canonical error codes:
- NOT_FOUND - The containing PerfSampleSeries does not exist
Args:
projectId: string, The cloud project (required)
historyId: string, A tool results history ID. (required)
executionId: string, A tool results execution ID. (required)
stepId: string, A tool results step ID. (required)
sampleSeriesId: string, A sample series id (required)
body: object, The request body.
The object takes the form of:
{ # The request must provide up to a maximum of 5000 samples to be
# created; a larger sample size will cause an INVALID_ARGUMENT error
"perfSamples": [ # The set of PerfSamples to create should not include existing timestamps
{ # Resource representing a single performance measure or data point
"sampleTime": { # A Timestamp represents a point in time independent of any time zone or local # Timestamp of collection.
# calendar, encoded as a count of seconds and fractions of seconds at
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
# January 1, 1970, in the proleptic Gregorian calendar which extends the
# Gregorian calendar backwards to year one.
#
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
# second table is needed for interpretation, using a [24-hour linear
# smear](https://developers.google.com/time/smear).
#
# The 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](https://www.ietf.org/rfc/rfc3339.txt) date strings.
"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.
"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.
},
"value": 3.14, # Value observed
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{
"perfSamples": [
{ # Resource representing a single performance measure or data point
"sampleTime": { # A Timestamp represents a point in time independent of any time zone or local # Timestamp of collection.
# calendar, encoded as a count of seconds and fractions of seconds at
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
# January 1, 1970, in the proleptic Gregorian calendar which extends the
# Gregorian calendar backwards to year one.
#
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
# second table is needed for interpretation, using a [24-hour linear
# smear](https://developers.google.com/time/smear).
#
# The 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](https://www.ietf.org/rfc/rfc3339.txt) date strings.
"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.
"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.
},
"value": 3.14, # Value observed
},
],
}
list(projectId, historyId, executionId, stepId, sampleSeriesId, pageToken=None, pageSize=None, x__xgafv=None)
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
May 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
Args:
projectId: string, The cloud project (required)
historyId: string, A tool results history ID. (required)
executionId: string, A tool results execution ID. (required)
stepId: string, A tool results step ID. (required)
sampleSeriesId: string, A sample series id (required)
pageToken: string, Optional, the next_page_token returned in the previous response
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
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{
"perfSamples": [
{ # Resource representing a single performance measure or data point
"sampleTime": { # A Timestamp represents a point in time independent of any time zone or local # Timestamp of collection.
# calendar, encoded as a count of seconds and fractions of seconds at
# nanosecond resolution. The count is relative to an epoch at UTC midnight on
# January 1, 1970, in the proleptic Gregorian calendar which extends the
# Gregorian calendar backwards to year one.
#
# All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
# second table is needed for interpretation, using a [24-hour linear
# smear](https://developers.google.com/time/smear).
#
# The 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](https://www.ietf.org/rfc/rfc3339.txt) date strings.
"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.
"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.
},
"value": 3.14, # Value observed
},
],
"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
}
list_next(previous_request, previous_response)
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.