chromium/components/segmentation_platform/internal/proto/client_results.proto

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";
option optimize_for = LITE_RUNTIME;

package segmentation_platform.proto;

import "components/segmentation_platform/public/proto/prediction_result.proto";

// Model result for a single client.
message ClientResult {
  // Result from the model evaluation for the client.
  optional PredictionResult client_result = 1;

  // Timestamp when this result was written to prefs.
  optional int64 timestamp_us = 2;

  // Timestamp when the result was first used by the client. Note that this is
  // only useful if there is a single feature that fetches the result.
  optional int64 first_used_timestamp = 3;
}

// Proto containing model results for all clients. Used for storing in prefs.
message ClientResults {
  // Contains results for all clients. Unique key associated with the client is
  // the key for the map.
  map<string, ClientResult> client_result_map = 1;
}