Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A51 update: Add application_utilization #374

Merged
merged 1 commit into from
Jun 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion A51-custom-backend-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ function recordCPUUtilizationMetric(double value);
// Records the memory utilization metric measurement for the call.
function recordMemoryUtilizationMetric(double value);

// Records the application specific utilization metric measurement for the call.
function recordApplicationUtilizationMetric(double value);

// Records the queries per second measurement.
function recordQpsMetric(double value);

Expand Down Expand Up @@ -128,6 +131,12 @@ function setMemoryUtilizationMetric(double value);
// Clear the memory utilization metrics data.
function deleteMemoryUtilizationMetric();

// Update the application specific utilization metrics data.
function setApplicationUtilizationMetric(double value);

// Clear the application specific utilization metrics data.
function deleteApplicationUtilizationMetric();

// Update the queries-per-second metrics data.
function setQpsMetric(double value);

Expand Down Expand Up @@ -325,6 +334,10 @@ public final class CallMetricRecorder {
// Records the memory utilization metric measurement for the call.
public CallMetricRecorder recordMemoryUtilizationMetric(double value);

// Records the application specific utilization metric measurement for the
// call.
public CallMetricRecorder recordApplicationUtilizationMetric(double value);

// Records the queries per second measurement.
public CallMetricRecorder recordQpsMetric(double value);

Expand Down Expand Up @@ -363,6 +376,12 @@ public class MetricRecorder {
// Clear the memory utilization metrics data.
public void clearMemoryUtilizationMetric();

// Update the application specific utilization metrics data.
public void setApplicationUtilizationMetric(double value);

// Clear the application specific utilization metrics data.
public void clearApplicationUtilizationMetric();

// Update the queries-per-second metrics data.
public void setQpsMetric(double value);

Expand Down Expand Up @@ -470,6 +489,13 @@ class CallMetricRecorder {
// Values outside of the valid range [0, 1] are ignored.
CallMetricRecorder& RecordMemoryUtilizationMetric(double value);

// Records a call metric measurement for the 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.
CallMetricRecorder& RecordApplicationUtilizationMetric(double value);

// 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.
Expand Down Expand Up @@ -534,7 +560,7 @@ class ServerMetricRecorder {
// Factory method. Use this to create.
static std::unique_ptr<ServerMetricRecorder> Create();
// Records the server CPU utilization in the range [0, infy).
// Values may be larger than 1.0 when the usage exceeds the the reporter
// Values may be larger than 1.0 when the usage exceeds the reporter
// dependent notion of soft limits.
// Values outside of the valid range are rejected.
// Overrides the stored value when called again with a valid value.
Expand All @@ -543,6 +569,12 @@ class ServerMetricRecorder {
// Values outside of the valid range are rejected.
// Overrides the stored value when called again with a valid value.
void SetMemoryUtilization(double value);
// Records the application specific utilization in the range [0, infy).
// Values may be larger than 1.0 when the usage exceeds the reporter
// dependent notion of soft limits.
// Values outside of the valid range are rejected.
// Overrides the stored value when called again with a valid value.
void SetApplicationUtilization(double value);
// Records number of queries per second to the server in the range [0, infy).
// Values outside of the valid range are rejected.
// Overrides the stored value when called again with a valid value.
Expand All @@ -568,6 +600,8 @@ class ServerMetricRecorder {
void ClearCpuUtilization();
// Clears the server memory utilization if recorded.
void ClearMemoryUtilization();
// Clears the application specific utilization if recorded.
void ClearApplicationUtilization();
// Clears number of queries per second to the server if recorded.
void ClearQps();
// Clears a named utilization value if exists.
Expand Down