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

// This is a subset of http://shortn/_cN8D8d0puv for the compatibility with
// the existing Android's RBE metric pipeline/dashboards.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v7.34.1
// source: rbe_metrics.proto

package proto

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// The full aggregated build stats and properties.
type RbeBuildMetrics struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Number of actions in the build.
	NumRecords int64 `protobuf:"varint,1,opt,name=num_records,json=numRecords,proto3" json:"num_records,omitempty"`
	// Aggregated build stats.
	Stats []*Stat `protobuf:"bytes,2,rep,name=stats,proto3" json:"stats,omitempty"`
	// RBE tooling version.
	ToolVersion string `protobuf:"bytes,5,opt,name=tool_version,json=toolVersion,proto3" json:"tool_version,omitempty"`
	// Unique invocation IDs of the aggregated actions.
	InvocationIds []string `protobuf:"bytes,6,rep,name=invocation_ids,json=invocationIds,proto3" json:"invocation_ids,omitempty"`
	// Information about the build machine.
	MachineInfo *MachineInfo `protobuf:"bytes,7,opt,name=machine_info,json=machineInfo,proto3" json:"machine_info,omitempty"`
	// The number of cache hits divided by the number of actions. 0 if there are
	// no actions.
	BuildCacheHitRatio float64 `protobuf:"fixed64,10,opt,name=build_cache_hit_ratio,json=buildCacheHitRatio,proto3" json:"build_cache_hit_ratio,omitempty"`
	// Total seconds between start of first build action and end of last build
	// action. 0 if there are no actions.
	BuildLatency  float64 `protobuf:"fixed64,11,opt,name=build_latency,json=buildLatency,proto3" json:"build_latency,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *RbeBuildMetrics) Reset() {
	*x = RbeBuildMetrics{}
	mi := &file_rbe_metrics_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *RbeBuildMetrics) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*RbeBuildMetrics) ProtoMessage() {}

func (x *RbeBuildMetrics) ProtoReflect() protoreflect.Message {
	mi := &file_rbe_metrics_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use RbeBuildMetrics.ProtoReflect.Descriptor instead.
func (*RbeBuildMetrics) Descriptor() ([]byte, []int) {
	return file_rbe_metrics_proto_rawDescGZIP(), []int{0}
}

func (x *RbeBuildMetrics) GetNumRecords() int64 {
	if x != nil {
		return x.NumRecords
	}
	return 0
}

func (x *RbeBuildMetrics) GetStats() []*Stat {
	if x != nil {
		return x.Stats
	}
	return nil
}

func (x *RbeBuildMetrics) GetToolVersion() string {
	if x != nil {
		return x.ToolVersion
	}
	return ""
}

func (x *RbeBuildMetrics) GetInvocationIds() []string {
	if x != nil {
		return x.InvocationIds
	}
	return nil
}

func (x *RbeBuildMetrics) GetMachineInfo() *MachineInfo {
	if x != nil {
		return x.MachineInfo
	}
	return nil
}

func (x *RbeBuildMetrics) GetBuildCacheHitRatio() float64 {
	if x != nil {
		return x.BuildCacheHitRatio
	}
	return 0
}

func (x *RbeBuildMetrics) GetBuildLatency() float64 {
	if x != nil {
		return x.BuildLatency
	}
	return 0
}

type Stat struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The metric/stat name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The number of all the true values for booleans, the sum of all the
	// values for ints.
	Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	// For enum stats, the count of each value.
	CountsByValue []*Stat_Value `protobuf:"bytes,3,rep,name=counts_by_value,json=countsByValue,proto3" json:"counts_by_value,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Stat) Reset() {
	*x = Stat{}
	mi := &file_rbe_metrics_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Stat) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Stat) ProtoMessage() {}

func (x *Stat) ProtoReflect() protoreflect.Message {
	mi := &file_rbe_metrics_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Stat.ProtoReflect.Descriptor instead.
func (*Stat) Descriptor() ([]byte, []int) {
	return file_rbe_metrics_proto_rawDescGZIP(), []int{1}
}

func (x *Stat) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Stat) GetCount() int64 {
	if x != nil {
		return x.Count
	}
	return 0
}

func (x *Stat) GetCountsByValue() []*Stat_Value {
	if x != nil {
		return x.CountsByValue
	}
	return nil
}

type MachineInfo struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Number of CPU cores that the machine has.
	NumCpu int64 `protobuf:"varint,1,opt,name=num_cpu,json=numCpu,proto3" json:"num_cpu,omitempty"`
	// Amount of RAM that the machine has in megabytes.
	RamMbs int64 `protobuf:"varint,2,opt,name=ram_mbs,json=ramMbs,proto3" json:"ram_mbs,omitempty"`
	// Type of operating system of the build machine.
	OsFamily string `protobuf:"bytes,3,opt,name=os_family,json=osFamily,proto3" json:"os_family,omitempty"`
	// The architecture of the machine's CPU.
	Arch          string `protobuf:"bytes,4,opt,name=arch,proto3" json:"arch,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MachineInfo) Reset() {
	*x = MachineInfo{}
	mi := &file_rbe_metrics_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MachineInfo) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MachineInfo) ProtoMessage() {}

func (x *MachineInfo) ProtoReflect() protoreflect.Message {
	mi := &file_rbe_metrics_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use MachineInfo.ProtoReflect.Descriptor instead.
func (*MachineInfo) Descriptor() ([]byte, []int) {
	return file_rbe_metrics_proto_rawDescGZIP(), []int{2}
}

func (x *MachineInfo) GetNumCpu() int64 {
	if x != nil {
		return x.NumCpu
	}
	return 0
}

func (x *MachineInfo) GetRamMbs() int64 {
	if x != nil {
		return x.RamMbs
	}
	return 0
}

func (x *MachineInfo) GetOsFamily() string {
	if x != nil {
		return x.OsFamily
	}
	return ""
}

func (x *MachineInfo) GetArch() string {
	if x != nil {
		return x.Arch
	}
	return ""
}

type Stat_Value struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Name          string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Count         int64                  `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Stat_Value) Reset() {
	*x = Stat_Value{}
	mi := &file_rbe_metrics_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Stat_Value) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Stat_Value) ProtoMessage() {}

func (x *Stat_Value) ProtoReflect() protoreflect.Message {
	mi := &file_rbe_metrics_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Stat_Value.ProtoReflect.Descriptor instead.
func (*Stat_Value) Descriptor() ([]byte, []int) {
	return file_rbe_metrics_proto_rawDescGZIP(), []int{1, 0}
}

func (x *Stat_Value) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Stat_Value) GetCount() int64 {
	if x != nil {
		return x.Count
	}
	return 0
}

var File_rbe_metrics_proto protoreflect.FileDescriptor

const file_rbe_metrics_proto_rawDesc = "" +
	"\n" +
	"\x11rbe_metrics.proto\x12\breclient\"\xd2\x02\n" +
	"\x0fRbeBuildMetrics\x12\x1f\n" +
	"\vnum_records\x18\x01 \x01(\x03R\n" +
	"numRecords\x12$\n" +
	"\x05stats\x18\x02 \x03(\v2\x0e.reclient.StatR\x05stats\x12!\n" +
	"\ftool_version\x18\x05 \x01(\tR\vtoolVersion\x12%\n" +
	"\x0einvocation_ids\x18\x06 \x03(\tR\rinvocationIds\x128\n" +
	"\fmachine_info\x18\a \x01(\v2\x15.reclient.MachineInfoR\vmachineInfo\x121\n" +
	"\x15build_cache_hit_ratio\x18\n" +
	" \x01(\x01R\x12buildCacheHitRatio\x12#\n" +
	"\rbuild_latency\x18\v \x01(\x01R\fbuildLatencyJ\x04\b\x04\x10\x05J\x04\b\t\x10\n" +
	"J\x04\b\f\x10\rJ\x04\b\x03\x10\x04J\x04\b\b\x10\t\"\xc5\x01\n" +
	"\x04Stat\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
	"\x05count\x18\x02 \x01(\x03R\x05count\x12<\n" +
	"\x0fcounts_by_value\x18\x03 \x03(\v2\x14.reclient.Stat.ValueR\rcountsByValue\x1a1\n" +
	"\x05Value\x12\x12\n" +
	"\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
	"\x05count\x18\x02 \x01(\x03R\x05countJ\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\x06\x10\aJ\x04\b\a\x10\bJ\x04\b\b\x10\tJ\x04\b\t\x10\n" +
	"\"p\n" +
	"\vMachineInfo\x12\x17\n" +
	"\anum_cpu\x18\x01 \x01(\x03R\x06numCpu\x12\x17\n" +
	"\aram_mbs\x18\x02 \x01(\x03R\x06ramMbs\x12\x1b\n" +
	"\tos_family\x18\x03 \x01(\tR\bosFamily\x12\x12\n" +
	"\x04arch\x18\x04 \x01(\tR\x04archB;Z9go.chromium.org/build/siso/toolsupport/reclientutil/protob\x06proto3"

var (
	file_rbe_metrics_proto_rawDescOnce sync.Once
	file_rbe_metrics_proto_rawDescData []byte
)

func file_rbe_metrics_proto_rawDescGZIP() []byte {
	file_rbe_metrics_proto_rawDescOnce.Do(func() {
		file_rbe_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_rbe_metrics_proto_rawDesc), len(file_rbe_metrics_proto_rawDesc)))
	})
	return file_rbe_metrics_proto_rawDescData
}

var file_rbe_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_rbe_metrics_proto_goTypes = []any{
	(*RbeBuildMetrics)(nil), // 0: reclient.RbeBuildMetrics
	(*Stat)(nil),            // 1: reclient.Stat
	(*MachineInfo)(nil),     // 2: reclient.MachineInfo
	(*Stat_Value)(nil),      // 3: reclient.Stat.Value
}
var file_rbe_metrics_proto_depIdxs = []int32{
	1, // 0: reclient.RbeBuildMetrics.stats:type_name -> reclient.Stat
	2, // 1: reclient.RbeBuildMetrics.machine_info:type_name -> reclient.MachineInfo
	3, // 2: reclient.Stat.counts_by_value:type_name -> reclient.Stat.Value
	3, // [3:3] is the sub-list for method output_type
	3, // [3:3] is the sub-list for method input_type
	3, // [3:3] is the sub-list for extension type_name
	3, // [3:3] is the sub-list for extension extendee
	0, // [0:3] is the sub-list for field type_name
}

func init() { file_rbe_metrics_proto_init() }
func file_rbe_metrics_proto_init() {
	if File_rbe_metrics_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_rbe_metrics_proto_rawDesc), len(file_rbe_metrics_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_rbe_metrics_proto_goTypes,
		DependencyIndexes: file_rbe_metrics_proto_depIdxs,
		MessageInfos:      file_rbe_metrics_proto_msgTypes,
	}.Build()
	File_rbe_metrics_proto = out.File
	file_rbe_metrics_proto_goTypes = nil
	file_rbe_metrics_proto_depIdxs = nil
}
