go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/server/dsmapper/dsmapperpb/messages.proto (about)

     1  // Copyright 2018 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.server.dsmapper;
    18  
    19  option go_package = "go.chromium.org/luci/server/dsmapper/dsmapperpb";
    20  
    21  import "google/protobuf/timestamp.proto";
    22  
    23  
    24  // State of a job or one of its shards.
    25  enum State {
    26    STATE_UNSPECIFIED = 0;
    27    STARTING          = 1;
    28    RUNNING           = 2;
    29    ABORTING          = 3;
    30    SUCCESS           = 4;
    31    FAIL              = 5;
    32    ABORTED           = 6;
    33  }
    34  
    35  
    36  // Information about some single shard of a job.
    37  message ShardInfo {
    38    int32 index  = 1;  // zero-based index of the shard
    39    State state  = 2;
    40    string error = 3;  // human readable error message, for failed shards only
    41  
    42    google.protobuf.Timestamp created = 4;  // when it was created
    43    google.protobuf.Timestamp updated = 5;  // when it was updated last time
    44    google.protobuf.Timestamp eta     = 6;  // when it finishes (if tracking progress)
    45  
    46    int64 processed_entities = 7;  // number of processed entities thus far
    47    int64 total_entities     = 8;  // total number of entities or -1 if unknown
    48    float entities_per_sec   = 9;  // rate of processing, entities per second
    49  }
    50  
    51  
    52  // Information about a job.
    53  message JobInfo {
    54    int64 id    = 1;  // unique job identifier
    55    State state = 2;  // overall state of the job
    56  
    57    google.protobuf.Timestamp created = 3;  // when it was created
    58    google.protobuf.Timestamp updated = 4;  // when it was updated last time
    59    google.protobuf.Timestamp eta     = 5;  // when it finishes (if tracking progress)
    60  
    61    int64 processed_entities = 6;  // number of processed entities thus far
    62    int64 total_entities     = 7;  // total number of entities or -1 if unknown
    63    float entities_per_sec   = 8;  // rate of processing, entities per second
    64  
    65    repeated ShardInfo shards = 20;  // state of all job's shards
    66  }