-
Notifications
You must be signed in to change notification settings - Fork 84
/
Copy pathmetric_spec.proto
40 lines (34 loc) · 1.66 KB
/
metric_spec.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Protos for identifying metrics and specifying thresholds.
syntax = "proto3";
package nighthawk.adaptive_load;
import "envoy/config/core/v3/extension.proto";
import "google/protobuf/wrappers.proto";
import "validate/validate.proto";
// Identifies a feedback metric.
message MetricSpec {
// Name of the metric to evaluate. For the set of built-in metric names, see
// source/adaptive_load/metrics_plugin_impl.cc. Required.
string metric_name = 1 [(validate.rules).string.min_len = 1];
// Name of the MetricsPlugin providing the metric. Optional, default "nighthawk.builtin".
string metrics_plugin_name = 2;
}
// Specifies how to score a metric against a threshold.
message ThresholdSpec {
// Selection and configuration of a ScoringFunction that measures proximity
// to a threshold. 0.0 means the value equals the threshold, positive means
// the value is within the threshold so the input should ramp up, and
// negative means the value is outside the threshold so input should ramp
// down.
envoy.config.core.v3.TypedExtensionConfig scoring_function = 1
[(validate.rules).message.required = true];
// Relative importance of this threshold when adjusting based on multiple
// metrics. Optional, default 1.0.
google.protobuf.DoubleValue weight = 2 [(validate.rules).double.gt = 0.0];
}
// Identifies a feedback metric and specifies a threshold for it.
message MetricSpecWithThreshold {
// Identifies a metric to collect and evaluate. Required.
MetricSpec metric_spec = 1 [(validate.rules).message.required = true];
// Specifies a threshold for this metric. Required.
ThresholdSpec threshold_spec = 2 [(validate.rules).message.required = true];
}