| syntax = "proto3"; |
| |
| package traceservice; |
| |
| // TraceService stores trace information for both Gold and Perf. |
| service TraceService { |
| |
| // Returns a list of traceids that don't have Params stored in the datastore. |
| rpc MissingParams(MissingParamsRequest) returns (MissingParamsResponse) {} |
| |
| // Adds Params for a set of traceids. |
| rpc AddParams(AddParamsRequest) returns (Empty) {} |
| |
| // Adds data for a set of traces for a particular commitid. |
| rpc Add(AddRequest) returns (Empty) {} |
| |
| // List returns all the CommitIDs that exist in the given time range. |
| rpc List(ListRequest) returns (ListResponse) {} |
| |
| // GetValues returns all the trace values stored for the given CommitID. |
| rpc GetValues(GetValuesRequest) returns (GetValuesResponse) {} |
| |
| // GetParams returns the Params for all of the given traces. |
| rpc GetParams(GetParamsRequest) returns (GetParamsResponse) {} |
| |
| // GetValuesRaw returns all the trace values stored for the given CommitID in |
| // the raw format stored in BoltDB. The decoding can be done by calling |
| // NewCommitInfo() on the returned byte slice. |
| rpc GetValuesRaw(GetValuesRequest) returns (GetValuesRawResponse) {} |
| |
| // GetTraceIDs returns the traceids for the given trace64ids. These are used |
| // in decoding the bytes returned from GetValuesRaw. |
| rpc GetTraceIDs(GetTraceIDsRequest) returns (GetTraceIDsResponse) {} |
| |
| // Ping should always succeed. Used to test if the service is up and |
| // running. |
| rpc Ping (Empty) returns (Empty) {} |
| } |
| |
| message Empty { |
| } |
| |
| // CommitID identifies one commit, or trybot try. |
| message CommitID { |
| // The id of a commit, either a git hash, or a Reitveld patch id. |
| string id = 1; |
| |
| // The source of the commit, either a git branch name, or a Reitveld issue id. |
| string source = 2; |
| |
| // The timestamp of the commit or trybot patch. |
| int64 timestamp = 3; |
| } |
| |
| // Params are the key-value pairs for a single trace. |
| // |
| // All of the key-value parameters should be present, the ones used to |
| // construct the traceid, along with optional parameters. |
| message Params { |
| map<string, string> params = 1; |
| } |
| |
| message MissingParamsRequest { |
| repeated string traceids = 1; |
| } |
| |
| message MissingParamsResponse { |
| repeated string traceids = 1; |
| } |
| |
| message ParamsPair { |
| string key = 1; |
| map<string, string> params = 2; |
| } |
| |
| message AddParamsRequest { |
| repeated ParamsPair params = 4; |
| } |
| |
| // StoredEntry is used to serialize the Params to be stored in the BoltBD. |
| message StoredEntry { |
| Params params = 2; |
| } |
| |
| message ValuePair { |
| string key = 1; |
| bytes value = 2; |
| } |
| |
| message AddRequest { |
| // The id of the commit/trybot we are adding data about. |
| CommitID commitid = 1; |
| |
| repeated ValuePair values = 3; |
| } |
| |
| message ListRequest { |
| // begin is the unix timestamp to start searching from. |
| int64 begin = 1; |
| |
| // end is the unix timestamp to search to (inclusive). |
| int64 end = 2; |
| } |
| |
| message ListResponse { |
| // A list of CommitIDs that fall between the given timestamps in |
| // ListRequest. |
| repeated CommitID commitids = 3; |
| } |
| |
| message GetValuesRequest { |
| CommitID commitid = 1; |
| } |
| |
| message GetValuesResponse { |
| repeated ValuePair values = 4; |
| string md5 = 5; |
| } |
| |
| message GetParamsRequest { |
| // A list of traceids. |
| repeated string traceids = 1; |
| } |
| |
| message GetParamsResponse { |
| repeated ParamsPair params = 4; |
| } |
| |
| message GetValuesRawResponse { |
| // Raw byte slice that can be decoded with NewCommitInfo. |
| bytes value = 1; |
| string md5 = 2; |
| } |
| |
| message GetTraceIDsRequest { |
| repeated uint64 id = 1; |
| } |
| |
| message TraceIDPair { |
| uint64 id64 = 1; |
| string id = 2; |
| } |
| |
| message GetTraceIDsResponse { |
| repeated TraceIDPair ids = 1; |
| } |
| |
| message CommitMD5 { |
| CommitID commitid = 1; |
| string md5 = 2; |
| } |