Reference documentation and code samples for the Stackdriver Monitoring V3 Client class TimeSeriesRatio.
ATimeSeriesRatiospecifies twoTimeSeriesto use for computing thegood_service / total_serviceratio. The specifiedTimeSeriesmust haveValueType = DOUBLEorValueType = INT64and must haveMetricKind =
DELTAorMetricKind = CUMULATIVE. TheTimeSeriesRatiomust specify
exactly two of good, bad, and total, and the relationshipgood_service +
bad_service = total_servicewill be assumed.
Generated from protobuf messagegoogle.monitoring.v3.TimeSeriesRatio
Namespace
Google \ Cloud \ Monitoring \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ good_service_filter
string
Amonitoring filterspecifying aTimeSeriesquantifying good service provided. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind = DELTAorMetricKind = CUMULATIVE.
↳ bad_service_filter
string
Amonitoring filterspecifying aTimeSeriesquantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind = DELTAorMetricKind = CUMULATIVE.
↳ total_service_filter
string
Amonitoring filterspecifying aTimeSeriesquantifying total demanded service. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind = DELTAorMetricKind = CUMULATIVE.
getGoodServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying good service provided. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind =
DELTAorMetricKind = CUMULATIVE.
Returns
Type
Description
string
setGoodServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying good service provided. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind =
DELTAorMetricKind = CUMULATIVE.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getBadServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying bad service, either demanded service
that was not provided or demanded service that was of inadequate quality.
Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind = DELTAorMetricKind = CUMULATIVE.
Returns
Type
Description
string
setBadServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying bad service, either demanded service
that was not provided or demanded service that was of inadequate quality.
Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind = DELTAorMetricKind = CUMULATIVE.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTotalServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying total demanded service. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind =
DELTAorMetricKind = CUMULATIVE.
Returns
Type
Description
string
setTotalServiceFilter
Amonitoring filterspecifying aTimeSeriesquantifying total demanded service. Must haveValueType = DOUBLEorValueType = INT64and must haveMetricKind =
DELTAorMetricKind = CUMULATIVE.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Stackdriver Monitoring V3 Client - Class TimeSeriesRatio (2.1.2)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.2 (latest)](/php/docs/reference/cloud-monitoring/latest/V3.TimeSeriesRatio)\n- [2.1.1](/php/docs/reference/cloud-monitoring/2.1.1/V3.TimeSeriesRatio)\n- [2.0.1](/php/docs/reference/cloud-monitoring/2.0.1/V3.TimeSeriesRatio)\n- [1.12.1](/php/docs/reference/cloud-monitoring/1.12.1/V3.TimeSeriesRatio)\n- [1.11.1](/php/docs/reference/cloud-monitoring/1.11.1/V3.TimeSeriesRatio)\n- [1.10.3](/php/docs/reference/cloud-monitoring/1.10.3/V3.TimeSeriesRatio)\n- [1.9.0](/php/docs/reference/cloud-monitoring/1.9.0/V3.TimeSeriesRatio)\n- [1.8.0](/php/docs/reference/cloud-monitoring/1.8.0/V3.TimeSeriesRatio)\n- [1.7.1](/php/docs/reference/cloud-monitoring/1.7.1/V3.TimeSeriesRatio)\n- [1.6.0](/php/docs/reference/cloud-monitoring/1.6.0/V3.TimeSeriesRatio)\n- [1.5.1](/php/docs/reference/cloud-monitoring/1.5.1/V3.TimeSeriesRatio)\n- [1.4.0](/php/docs/reference/cloud-monitoring/1.4.0/V3.TimeSeriesRatio)\n- [1.3.2](/php/docs/reference/cloud-monitoring/1.3.2/V3.TimeSeriesRatio)\n- [1.2.2](/php/docs/reference/cloud-monitoring/1.2.2/V3.TimeSeriesRatio) \nReference documentation and code samples for the Stackdriver Monitoring V3 Client class TimeSeriesRatio.\n\nA `TimeSeriesRatio` specifies two `TimeSeries` to use for computing the\n`good_service / total_service` ratio. The specified `TimeSeries` must have\n`ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =\nDELTA` or `MetricKind = CUMULATIVE`. The `TimeSeriesRatio` must specify\nexactly two of good, bad, and total, and the relationship `good_service +\nbad_service = total_service` will be assumed.\n\nGenerated from protobuf message `google.monitoring.v3.TimeSeriesRatio`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Monitoring \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getGoodServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying good service provided. Must have\n`ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =\nDELTA` or `MetricKind = CUMULATIVE`.\n\n### setGoodServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying good service provided. Must have\n`ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =\nDELTA` or `MetricKind = CUMULATIVE`.\n\n### getBadServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying bad service, either demanded service\nthat was not provided or demanded service that was of inadequate quality.\n\nMust have `ValueType = DOUBLE` or `ValueType = INT64` and must have\n`MetricKind = DELTA` or `MetricKind = CUMULATIVE`.\n\n### setBadServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying bad service, either demanded service\nthat was not provided or demanded service that was of inadequate quality.\n\nMust have `ValueType = DOUBLE` or `ValueType = INT64` and must have\n`MetricKind = DELTA` or `MetricKind = CUMULATIVE`.\n\n### getTotalServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying total demanded service. Must have\n`ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =\nDELTA` or `MetricKind = CUMULATIVE`.\n\n### setTotalServiceFilter\n\nA [monitoring filter](https://cloud.google.com/monitoring/api/v3/filters)\nspecifying a `TimeSeries` quantifying total demanded service. Must have\n`ValueType = DOUBLE` or `ValueType = INT64` and must have `MetricKind =\nDELTA` or `MetricKind = CUMULATIVE`."]]