Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ad1a69e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Sync gauge metric proto to AOSP."

parents 3bb2a25b fa28aec3
Loading
Loading
Loading
Loading
+49 −1
Original line number Diff line number Diff line
@@ -69,6 +69,34 @@ message DurationMetricData {
  repeated DurationBucketInfo bucket_info = 2;
}

message ValueBucketInfo {
  optional int64 start_bucket_nanos = 1;

  optional int64 end_bucket_nanos = 2;

  optional int64 value = 3;
}

message ValueMetricData {
  repeated KeyValuePair dimension = 1;

  repeated ValueBucketInfo bucket_info = 2;
}

message GaugeBucketInfo {
  optional int64 start_bucket_nanos = 1;

  optional int64 end_bucket_nanos = 2;

  optional int64 gauge = 3;
}

message GaugeMetricData {
  repeated KeyValuePair dimension = 1;

  repeated GaugeBucketInfo bucket_info = 2;
}

message UidMapping {
  message AppInfo {
    optional string app = 1;
@@ -83,7 +111,7 @@ message UidMapping {
  message Change {
    optional bool deletion = 1;

    optional int64 timestamp = 2;
    optional int64 timestamp_nanos = 2;
    optional string app = 3;
    optional int32 uid = 4;

@@ -108,9 +136,29 @@ message StatsLogReport {
  message DurationMetricDataWrapper {
    repeated DurationMetricData data = 1;
  }
  message ValueMetricDataWrapper {
    repeated ValueMetricData data = 1;
  }
  message GaugeMetricDataWrapper {
    repeated GaugeMetricData data = 1;
  }
  oneof data {
    EventMetricDataWrapper event_metrics = 4;
    CountMetricDataWrapper count_metrics = 5;
    DurationMetricDataWrapper duration_metrics = 6;
    ValueMetricDataWrapper value_metrics = 7;
    GaugeMetricDataWrapper gauge_metrics = 8;
  }
}

message ConfigMetricsReport {
  message ConfigKey {
    optional int32 uid = 1;
    optional string name = 2;
  }
  optional ConfigKey config_key = 1;

  repeated StatsLogReport metrics = 2;

  optional UidMapping uid_map = 3;
}
+30 −5
Original line number Diff line number Diff line
@@ -168,7 +168,28 @@ message DurationMetric {

  optional Bucket bucket = 8;

  repeated EventConditionLink links = 9;
  repeated Alert alerts = 9;

  repeated EventConditionLink links = 10;

}

message GaugeMetric {
  optional int64 metric_id = 1;

  optional string what = 2;

  optional int32 gauge_field = 3;

  optional string condition = 4;

  repeated KeyMatcher dimension = 5;

  optional Bucket bucket = 6;

  repeated Alert alerts = 7;

  repeated EventConditionLink links = 8;
}

message ValueMetric {
@@ -184,6 +205,10 @@ message ValueMetric {

  optional Bucket bucket = 6;

  repeated Alert alerts = 7;

  repeated EventConditionLink links = 8;

  enum Operation {
    SUM_DIFF = 1;
    MIN_DIFF = 2;
@@ -194,7 +219,7 @@ message ValueMetric {
    FIRST = 7;
    LAST = 8;
  }
  optional Operation operation = 7;
  optional Operation operation = 9 [default = SUM];
}

message EventConditionLink {