GRPC C++
1.66.0
|
Records call metrics for the purpose of load balancing. More...
#include <call_metric_recorder.h>
Public Member Functions | |
virtual | ~CallMetricRecorder ()=default |
virtual CallMetricRecorder & | RecordCpuUtilizationMetric (double value)=0 |
Records a call metric measurement for CPU utilization. More... | |
virtual CallMetricRecorder & | RecordMemoryUtilizationMetric (double value)=0 |
Records a call metric measurement for memory utilization. More... | |
virtual CallMetricRecorder & | RecordApplicationUtilizationMetric (double value)=0 |
Records a call metric measurement for application specific utilization. More... | |
virtual CallMetricRecorder & | RecordQpsMetric (double value)=0 |
Records a call metric measurement for queries per second. More... | |
virtual CallMetricRecorder & | RecordEpsMetric (double value)=0 |
Records a call metric measurement for errors per second. More... | |
virtual CallMetricRecorder & | RecordUtilizationMetric (string_ref name, double value)=0 |
Records a call metric measurement for utilization. More... | |
virtual CallMetricRecorder & | RecordRequestCostMetric (string_ref name, double value)=0 |
Records a call metric measurement for request cost. More... | |
virtual CallMetricRecorder & | RecordNamedMetric (string_ref name, double value)=0 |
Records an application-specific opaque metric measurement. More... | |
Records call metrics for the purpose of load balancing.
During an RPC, call ServerContext::ExperimentalGetCallMetricRecorder() method to retrive the recorder for the current call.
|
virtualdefault |
|
pure virtual |
Records a call metric measurement for application specific utilization.
Multiple calls to this method will override the stored value. Values may be larger than 1.0 when the usage exceeds the reporter dependent notion of soft limits. Values outside of the valid range [0, infy] are ignored.
|
pure virtual |
Records a call metric measurement for CPU utilization.
Multiple calls to this method will override the stored value. Values may be larger than 1.0 when the usage exceeds the reporter dependent notion of soft limits. Values outside of the valid range [0, infy] are ignored.
|
pure virtual |
Records a call metric measurement for errors per second.
Multiple calls to this method will override the stored value. Values outside of the valid range [0, infy) are ignored.
|
pure virtual |
Records a call metric measurement for memory utilization.
Multiple calls to this method will override the stored value. Values outside of the valid range [0, 1] are ignored.
|
pure virtual |
Records an application-specific opaque metric measurement.
Multiple calls to this method with the same name will override the corresponding stored value. The lifetime of the name string needs to be longer than the lifetime of the RPC itself, since it's going to be sent as trailers after the RPC finishes. It is assumed the strings are common names that are global constants.
|
pure virtual |
Records a call metric measurement for queries per second.
Multiple calls to this method will override the stored value. Values outside of the valid range [0, infy) are ignored.
|
pure virtual |
Records a call metric measurement for request cost.
Multiple calls to this method with the same name will override the corresponding stored value. The lifetime of the name string needs to be longer than the lifetime of the RPC itself, since it's going to be sent as trailers after the RPC finishes. It is assumed the strings are common names that are global constants.
|
pure virtual |
Records a call metric measurement for utilization.
Multiple calls to this method with the same name will override the corresponding stored value. The lifetime of the name string needs to be longer than the lifetime of the RPC itself, since it's going to be sent as trailers after the RPC finishes. It is assumed the strings are common names that are global constants. Values outside of the valid range [0, 1] are ignored.