go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/clustering/proto/clusters.proto (about)

     1  // Copyright 2022 The LUCI Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  syntax = "proto3";
    16  
    17  package luci.analysis.internal.clustering;
    18  
    19  option go_package = "go.chromium.org/luci/analysis/internal/clustering/proto;clusteringpb";
    20  
    21  // Represents the clusters a chunk of test results are included in.
    22  message ChunkClusters {
    23    // The types of clusters in this proto.
    24    repeated ClusterType cluster_types = 1;
    25  
    26    // The identifiers of the clusters referenced in this proto.
    27    repeated ReferencedCluster referenced_clusters = 2;
    28  
    29    // The clusters of test results in the chunk. This is a list, so the first
    30    // TestResultClusters message is for first test result in the chunk,
    31    // the second message is for the second test result, and so on.
    32    repeated TestResultClusters result_clusters = 3;
    33  }
    34  
    35  // Defines a type of cluster.
    36  message ClusterType {
    37    // The algorithm used to create the cluster, e.g. "reason-0.1" for reason-based
    38    // clustering or "rule-0.1" for clusters based on failure association rules.
    39    // If specific algorithm versions are deprecated, this will allow us to target
    40    // cluster references for deletion.
    41    string algorithm = 1;
    42  
    43    // Other information we may wish to store about the cluster, like priority, etc.
    44  }
    45  
    46  // Represents a reference to a cluster.
    47  message ReferencedCluster {
    48    // The type of the referenced cluster, represented by an index
    49    // into the cluster_types list of ChunkClusters.
    50    int64 type_ref = 1;
    51  
    52    // The identifier of the referenced cluster (up to 16 bytes).
    53    bytes cluster_id = 2;
    54  }
    55  
    56  // Represents the clusters a test result is included in.
    57  message TestResultClusters {
    58    // The clusters the test result is a member of. Clusters are identified by
    59    // their index in the referenced_clusters list.
    60    repeated int64 cluster_refs = 1 [ packed = true ];
    61  }