1// Copyright 2024 The Chromium Authors 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5syntax = "proto3"; 6 7package build.util.lib.proto; 8 9import "google/protobuf/timestamp.proto"; 10 11// Stored under the field "extended_properties" with key "test_script_metrics" 12// in luci.resultdb.v1.Invocation message 13// Usually clients do not need to use this protobuf directly, instead, the 14// helpers in the build/util/lib/proto can help. 15 16// As a repeated message cannot fit directly into a google.protobuf.Struct, 17// Use "TestScriptMetrics" message as a wrap. 18message TestScriptMetrics { 19 repeated TestScriptMetric metrics = 1; 20} 21 22message TestScriptMetric { 23 string name = 1; 24 25 message DataPoint { 26 double value = 1; 27 google.protobuf.Timestamp timestamp = 2; 28 } 29 30 message DataPoints { 31 repeated DataPoint points = 1; 32 } 33 34 oneof OneOf { 35 // Usually it's preferred to aggregate the data before sending it out. Try 36 // various types of data aggregators in build/util/lib/proto. 37 double value = 2; 38 // A way to record all the data points in raw format. It's very expensive, 39 // and should be used with cautions. 40 DataPoints points = 3; 41 } 42} 43