| syntax = "proto3"; |
| |
| package culprit.v1; |
| |
| option go_package = "go.skia.org/infra/perf/go/culprit/proto/v1"; |
| |
| |
| // Handles all culprit related actions. |
| service CulpritService { |
| // Stores commits identified as culprits in persistent storage. |
| rpc PersistCulprit(PersistCulpritRequest) returns (PersistCulpritResponse) { |
| } |
| // Fetches a given culprit by id |
| rpc GetCulprit(GetCulpritRequest) returns (GetCulpritResponse) { |
| } |
| // Takes necessary actions to inform users about the anomalies. |
| rpc NotifyUserOfAnomaly(NotifyUserOfAnomalyRequest) returns (NotifyUserOfAnomalyResponse) { |
| } |
| // Takes necessary actions to inform users about the culprits. |
| rpc NotifyUserOfCulprit(NotifyUserOfCulpritRequest) returns (NotifyUserOfCulpritResponse) { |
| } |
| } |
| |
| |
| // Request object for PersistCulprit rpc. |
| message PersistCulpritRequest { |
| // List of commits identified as culprits. |
| repeated Commit commits = 1; |
| // ID of the anomaly group corresponding to the bisection. |
| string anomaly_group_id = 2; |
| } |
| |
| |
| // Response object for PersistCulprit rpc. |
| message PersistCulpritResponse { |
| // List of culprit ids created. |
| repeated string culprit_ids = 1; |
| } |
| |
| // Request object for GetCulprit rpc. |
| message GetCulpritRequest { |
| repeated string culprit_ids = 1; |
| } |
| |
| // Response object for GetCulprit rpc. |
| message GetCulpritResponse { |
| repeated Culprit culprits = 1; |
| } |
| |
| // Request object for NotifyUserOfAnomaly rpc. |
| message NotifyUserOfAnomalyRequest { |
| string anomaly_group_id = 1; |
| repeated Anomaly anomaly = 2; |
| } |
| |
| // Response object for NotifyUserOfAnomaly rpc. |
| message NotifyUserOfAnomalyResponse { |
| // Id of issue created |
| string issue_id = 1; |
| } |
| |
| // Request object for NotifyUserOfCulprit rpc. |
| message NotifyUserOfCulpritRequest { |
| // List of culprit ids. |
| repeated string culprit_ids = 1; |
| // ID of the anomaly group corresponding to the bisection. |
| string anomaly_group_id = 2; |
| } |
| |
| // Response object for NotifyUserOfCulprit rpc. |
| message NotifyUserOfCulpritResponse { |
| // List of issue ids created |
| repeated string issue_ids = 1; |
| } |
| |
| // Anomaly detected in a test |
| // Note: This is (right now) same as Anomaly object in anomalygroup_service.proto. But this has been |
| // duplicated because the two protos are used in two different service(culprit & anomlaygroup), and |
| // these services can evolve independently |
| message Anomaly { |
| // the start commit position of the detected anomaly |
| int64 start_commit = 1; |
| // the end commit position of the detected anomaly |
| int64 end_commit = 2; |
| // the paramset from the regression detected in Skia. The parameters |
| // are used in Skia alerts to define which tests to apply the deteciton |
| // rules. |
| // In chromeperf's context, it should include the following keys: |
| // - bot: |
| // the name of the bot (a.k.a, 'builder' in waterfall, and |
| // 'configuration' in pinpoint job page.) |
| // - benchmark: |
| // the name of the benchmark |
| // - story: |
| // the name of the story (a.k.a., test) |
| // - measurement: |
| // the metric to look at. (a.k.a., 'test' in skia query ui, |
| // and 'chart' in pinpoint job page) |
| // - stat: |
| // the aggregation method on the data points |
| map<string, string> paramset = 3; |
| // indicate the direction towards which the change should be |
| // considered as regression. |
| // The possible values are: UP, DOWN or UNKNOWN |
| string improvement_direction = 4; |
| // the median from the previous data point |
| float median_before = 5; |
| // the median from the current data point |
| float median_after = 6; |
| } |
| |
| |
| // Represents the change which has been identified as a culprit. |
| // TODO(wenbinzhang): remove anomaly group ids and issue ids as we have |
| // the info needed the group issue map |
| message Culprit { |
| string id = 1; |
| Commit commit = 2; |
| repeated string anomaly_group_ids = 3; |
| repeated string issue_ids = 4; |
| map<string, string> group_issue_map = 5; |
| } |
| |
| |
| // Represents a commit which has been identified as a culprit. |
| message Commit { |
| // Repo host e.g. chromium.googlesource.com |
| string host = 1; |
| // Project inside the repo e.g. chromium/src |
| string project = 2; |
| // Repo ref e.g. "refs/heads/main |
| string ref = 3; |
| // Commit Hash |
| string revision = 4; |
| } |