Skip to main content

samples

Creates, updates, deletes, gets or lists a samples resource.

Overview

Namesamples
TypeResource
Idfirebase.toolresults.samples

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
sampleTimeobjectTimestamp of collection. (id: Timestamp)
valuenumber (double)Value observed

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectprojectId, historyId, executionId, stepId, sampleSeriesIdpageSize, pageTokenLists 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
batch_createinsertprojectId, historyId, executionId, stepId, sampleSeriesIdCreates 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

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
executionIdstring
historyIdstring
projectIdstring
sampleSeriesIdstring
stepIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

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

SELECT
sampleTime,
value
FROM firebase.toolresults.samples
WHERE projectId = '{{ projectId }}' -- required
AND historyId = '{{ historyId }}' -- required
AND executionId = '{{ executionId }}' -- required
AND stepId = '{{ stepId }}' -- required
AND sampleSeriesId = '{{ sampleSeriesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';

INSERT examples

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

INSERT INTO firebase.toolresults.samples (
data__perfSamples,
projectId,
historyId,
executionId,
stepId,
sampleSeriesId
)
SELECT
'{{ perfSamples }}',
'{{ projectId }}',
'{{ historyId }}',
'{{ executionId }}',
'{{ stepId }}',
'{{ sampleSeriesId }}'
RETURNING
perfSamples
;