Skip to content

Commit

Permalink
Add app util (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
yousukseung authored Jun 7, 2023
1 parent 3d91f90 commit 39beb1d
Showing 1 changed file with 35 additions and 1 deletion.
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

0 comments on commit 39beb1d

Please sign in to comment.