Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: common/tsmon/ts_mon_proto/metrics.proto

Issue 1857643003: Revert of Migrate tsmon protos to proto3 (Closed) Base URL: git@github.com:luci/luci-go.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « common/tsmon/ts_mon_proto/acquisition_task.pb.go ('k') | common/tsmon/ts_mon_proto/metrics.pb.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/tsmon/ts_mon_proto/metrics.proto
diff --git a/common/tsmon/ts_mon_proto/metrics.proto b/common/tsmon/ts_mon_proto/metrics.proto
index 3842b236e846d4faf27bdb0adbf8478e7e727b33..8ff72e50fd671e85f3d071785cd3a20cf60167c2 100644
--- a/common/tsmon/ts_mon_proto/metrics.proto
+++ b/common/tsmon/ts_mon_proto/metrics.proto
@@ -4,7 +4,7 @@
// Copied from https://chromium.googlesource.com/infra/infra/+/master/infra_libs/ts_mon/protos/
-syntax = "proto3";
+syntax = "proto2";
package ts_mon.proto;
@@ -14,29 +14,28 @@
message MetricsCollection {
repeated MetricsData data = 1;
- uint64 start_timestamp_us = 2;
- string collection_point_id = 3;
+ optional uint64 start_timestamp_us = 2;
+ optional string collection_point_id = 3;
}
message MetricsField {
- string name = 1;
+ optional string name = 1;
- FieldType type = 3;
+ optional FieldType type = 3 [default = STRING];
enum FieldType {
- UNKNOWN = 0;
STRING = 1;
INT = 2;
BOOL = 3;
};
- string string_value = 4;
- int64 int_value = 5;
- bool bool_value = 6;
+ optional string string_value = 4;
+ optional int64 int_value = 5;
+ optional bool bool_value = 6;
}
message PrecomputedDistribution {
enum SpecType {
- UNKNOWN = 0;
+
CANONICAL_POWERS_OF_2 = 1;
CANONICAL_POWERS_OF_10_P_0_2 = 2;
CANONICAL_POWERS_OF_10 = 3;
@@ -44,37 +43,37 @@
CUSTOM_BOUNDED = 21;
}
- SpecType spec_type = 1;
- double width = 2;
- double growth_factor = 3;
- int32 num_buckets = 4;
+ optional SpecType spec_type = 1;
+ optional double width = 2 [default = 10.0];
+ optional double growth_factor = 3 [default = 0.0];
+ optional int32 num_buckets = 4 [default = 10];
repeated double lower_bounds = 5;
- bool is_cumulative = 6;
+ optional bool is_cumulative = 6 [default = false];
repeated sint64 bucket = 7;
- sint64 underflow = 8;
- sint64 overflow = 9;
- double mean = 10;
- double sum_of_squared_deviation = 11;
+ optional sint64 underflow = 8;
+ optional sint64 overflow = 9;
+ optional double mean = 10;
+ optional double sum_of_squared_deviation = 11;
}
message MetricsData {
- string name = 1; // Required.
- string metric_name_prefix = 2;
+ required string name = 1;
+ optional string metric_name_prefix = 2;
- ts_mon.proto.NetworkDevice network_device = 11;
- ts_mon.proto.Task task = 12;
+ optional ts_mon.proto.NetworkDevice network_device = 11;
+ optional ts_mon.proto.Task task = 12;
repeated MetricsField fields = 20;
- int64 counter = 30;
- int64 gauge = 32;
- double noncumulative_double_value = 34;
- PrecomputedDistribution distribution = 35;
- string string_value = 36;
- bool boolean_value = 37;
- double cumulative_double_value = 38;
+ optional int64 counter = 30;
+ optional int64 gauge = 32;
+ optional double noncumulative_double_value = 34;
+ optional PrecomputedDistribution distribution = 35;
+ optional string string_value = 36;
+ optional bool boolean_value = 37;
+ optional double cumulative_double_value = 38;
- uint64 start_timestamp_us = 40;
+ optional uint64 start_timestamp_us = 40;
enum Units {
UNKNOWN_UNITS = 0;
@@ -105,7 +104,7 @@
MILLIAMPS = 61;
DEGREES_CELSIUS = 62;
}
- Units units = 41;
+ optional Units units = 41;
- string description = 43;
+ optional string description = 43;
}
« no previous file with comments | « common/tsmon/ts_mon_proto/acquisition_task.pb.go ('k') | common/tsmon/ts_mon_proto/metrics.pb.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698