forked from evergreen-ci/cedar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
perf.proto
144 lines (124 loc) · 2.71 KB
/
perf.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
syntax = "proto3";
package cedar;
option go_package = "internal";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "formats.proto";
message ResultID {
string project = 1;
string version = 2;
string variant = 3;
string task_name = 4;
int32 execution = 5;
string task_id = 6;
string test_name = 7;
string parent = 8;
int32 trial = 9;
repeated string tags = 10;
map<string, int32> arguments = 11;
bool mainline = 12;
google.protobuf.Timestamp created_at = 13;
int32 order = 14;
}
message ResultData {
ResultID id = 1;
repeated ArtifactInfo artifacts = 2;
repeated RollupValue rollups = 3;
}
message ArtifactInfo {
StorageLocation location = 1;
string bucket = 2;
string prefix = 3;
string path = 4;
DataFormat format = 5;
CompressionType compression = 6;
SchemaType schema = 7;
repeated string tags = 8;
google.protobuf.Timestamp created_at = 9;
}
enum StorageLocation {
UNKNOWN = 0;
CEDAR_S3 = 1;
PROJECT_S3 = 2;
GRIDFS = 3;
EPHEMERAL = 4;
LOCAL = 5;
}
message MetricsSeriesEnd {
string id = 1;
bool is_complete = 2;
google.protobuf.Timestamp completed_at = 3;
}
message MetricsResponse {
string id = 1;
bool success = 2;
}
message SendResponse {
string id = 1;
bool success = 2;
int64 count = 3;
}
message MetricsPoint {
google.protobuf.Timestamp Time = 1;
MetricsCounters counters = 2;
MetricsTimers timers = 3;
MetricsGauges gauges = 4;
}
message MetricsCounters {
int64 ops = 1;
int64 size = 2;
int64 errors = 3;
}
message MetricsTimers {
google.protobuf.Duration duration = 1;
google.protobuf.Duration total = 2;
}
message MetricsGauges {
int64 state = 1;
int64 workers = 2;
bool failed = 3;
}
message MetricsEvent {
string id = 1;
repeated MetricsPoint Event = 3;
}
enum RollupType {
SUM = 0;
MEAN = 1;
MEDIAN = 2;
MAX = 3;
MIN = 4;
STANDARD_DEVIATION = 5;
THROUGHPUT = 6;
LATENCY = 7;
PERCENTILE_99TH = 8;
PERCENTILE_95TH = 9;
PERCENTILE_90TH = 10;
PERCENTILE_80TH = 11;
PERCENTILE_50TH = 12;
}
message RollupValue {
string name = 1;
oneof value {
int64 int = 2;
double fl = 3;
}
RollupType type = 4;
int64 version = 5;
bool user_submitted = 6;
}
message ArtifactData {
string id = 1;
repeated ArtifactInfo artifacts = 2;
}
message RollupData {
string id = 1;
repeated RollupValue rollups = 2;
}
service CedarPerformanceMetrics {
rpc CreateMetricSeries(ResultData) returns (MetricsResponse);
rpc AttachArtifacts(ArtifactData) returns (MetricsResponse);
rpc AttachRollups(RollupData) returns (MetricsResponse);
rpc SendMetrics(stream MetricsEvent) returns (SendResponse);
rpc CloseMetrics(MetricsSeriesEnd) returns (MetricsResponse);
}