Soong: Fix the package name in metrics.proto file

The metrics.proto needs to be imported to Google3 in order to unmarshal
the build metrics data from bigstore. Cleaned up the enum names to use
the Camel naming convention and renamed the build_metrics to
soong_metrics to be more specific to soong and to allow quering
soong_metrics files from bigstore.

Bug: b/135280521
Test: lunch andf m -j. Checked if soong_metrics was generated correctly
      by using printproto command.

Change-Id: I998c8d05db592e94a653d6ca32250b80df3c9b21
This commit is contained in:
Patrice Arruda 2019-06-14 15:27:46 -07:00
parent ad13e1185f
commit 0cc5b21516
6 changed files with 180 additions and 165 deletions

View File

@ -158,7 +158,7 @@ func main() {
stat.AddOutput(status.NewVerboseLog(log, filepath.Join(logsDir, "verbose.log")))
stat.AddOutput(status.NewErrorLog(log, filepath.Join(logsDir, "error.log")))
defer met.Dump(filepath.Join(logsDir, "build_metrics"))
defer met.Dump(filepath.Join(logsDir, "soong_metrics"))
if start, ok := os.LookupEnv("TRACE_BEGIN_SOONG"); ok {
if !strings.HasSuffix(start, "N") {

View File

@ -70,7 +70,7 @@ func (c ContextImpl) CompleteTrace(name, desc string, begin, end uint64) {
if c.Metrics != nil {
realTime := end - begin
c.Metrics.SetTimeMetrics(
metrics_proto.PerfInfo{
soong_metrics_proto.PerfInfo{
Desc: &desc,
Name: &name,
StartTime: &begin,

View File

@ -33,19 +33,19 @@ const (
)
type Metrics struct {
metrics metrics_proto.MetricsBase
metrics soong_metrics_proto.MetricsBase
TimeTracer TimeTracer
}
func New() (metrics *Metrics) {
m := &Metrics{
metrics: metrics_proto.MetricsBase{},
metrics: soong_metrics_proto.MetricsBase{},
TimeTracer: &timeTracerImpl{},
}
return m
}
func (m *Metrics) SetTimeMetrics(perf metrics_proto.PerfInfo) {
func (m *Metrics) SetTimeMetrics(perf soong_metrics_proto.PerfInfo) {
switch perf.GetName() {
case RunKati:
m.metrics.KatiRuns = append(m.metrics.KatiRuns, &perf)
@ -76,11 +76,11 @@ func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
case "TARGET_BUILD_VARIANT":
switch v {
case "user":
m.metrics.TargetBuildVariant = metrics_proto.MetricsBase_USER.Enum()
m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_USER.Enum()
case "userdebug":
m.metrics.TargetBuildVariant = metrics_proto.MetricsBase_USERDEBUG.Enum()
m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_USERDEBUG.Enum()
case "eng":
m.metrics.TargetBuildVariant = metrics_proto.MetricsBase_ENG.Enum()
m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_ENG.Enum()
default:
// ignored
}
@ -112,18 +112,18 @@ func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
}
}
func (m *Metrics) getArch(arch string) *metrics_proto.MetricsBase_ARCH {
func (m *Metrics) getArch(arch string) *soong_metrics_proto.MetricsBase_Arch {
switch arch {
case "arm":
return metrics_proto.MetricsBase_ARM.Enum()
return soong_metrics_proto.MetricsBase_ARM.Enum()
case "arm64":
return metrics_proto.MetricsBase_ARM64.Enum()
return soong_metrics_proto.MetricsBase_ARM64.Enum()
case "x86":
return metrics_proto.MetricsBase_X86.Enum()
return soong_metrics_proto.MetricsBase_X86.Enum()
case "x86_64":
return metrics_proto.MetricsBase_X86_64.Enum()
return soong_metrics_proto.MetricsBase_X86_64.Enum()
default:
return metrics_proto.MetricsBase_UNKNOWN.Enum()
return soong_metrics_proto.MetricsBase_UNKNOWN.Enum()
}
}
@ -148,7 +148,7 @@ func (m *Metrics) Dump(outputPath string) (err error) {
return err
}
tempPath := outputPath + ".tmp"
err = ioutil.WriteFile(tempPath, []byte(data), 0777)
err = ioutil.WriteFile(tempPath, []byte(data), 0644)
if err != nil {
return err
}

View File

@ -1,11 +1,13 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: metrics.proto
package metrics_proto
package soong_metrics_proto
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@ -16,65 +18,70 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type MetricsBase_BUILDVARIANT int32
type MetricsBase_BuildVariant int32
const (
MetricsBase_USER MetricsBase_BUILDVARIANT = 0
MetricsBase_USERDEBUG MetricsBase_BUILDVARIANT = 1
MetricsBase_ENG MetricsBase_BUILDVARIANT = 2
MetricsBase_USER MetricsBase_BuildVariant = 0
MetricsBase_USERDEBUG MetricsBase_BuildVariant = 1
MetricsBase_ENG MetricsBase_BuildVariant = 2
)
var MetricsBase_BUILDVARIANT_name = map[int32]string{
var MetricsBase_BuildVariant_name = map[int32]string{
0: "USER",
1: "USERDEBUG",
2: "ENG",
}
var MetricsBase_BUILDVARIANT_value = map[string]int32{
var MetricsBase_BuildVariant_value = map[string]int32{
"USER": 0,
"USERDEBUG": 1,
"ENG": 2,
}
func (x MetricsBase_BUILDVARIANT) Enum() *MetricsBase_BUILDVARIANT {
p := new(MetricsBase_BUILDVARIANT)
func (x MetricsBase_BuildVariant) Enum() *MetricsBase_BuildVariant {
p := new(MetricsBase_BuildVariant)
*p = x
return p
}
func (x MetricsBase_BUILDVARIANT) String() string {
return proto.EnumName(MetricsBase_BUILDVARIANT_name, int32(x))
func (x MetricsBase_BuildVariant) String() string {
return proto.EnumName(MetricsBase_BuildVariant_name, int32(x))
}
func (x *MetricsBase_BUILDVARIANT) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricsBase_BUILDVARIANT_value, data, "MetricsBase_BUILDVARIANT")
func (x *MetricsBase_BuildVariant) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricsBase_BuildVariant_value, data, "MetricsBase_BuildVariant")
if err != nil {
return err
}
*x = MetricsBase_BUILDVARIANT(value)
*x = MetricsBase_BuildVariant(value)
return nil
}
func (MetricsBase_BUILDVARIANT) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{0, 0}
func (MetricsBase_BuildVariant) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{0, 0}
}
type MetricsBase_ARCH int32
type MetricsBase_Arch int32
const (
MetricsBase_UNKNOWN MetricsBase_ARCH = 0
MetricsBase_ARM MetricsBase_ARCH = 1
MetricsBase_ARM64 MetricsBase_ARCH = 2
MetricsBase_X86 MetricsBase_ARCH = 3
MetricsBase_X86_64 MetricsBase_ARCH = 4
MetricsBase_UNKNOWN MetricsBase_Arch = 0
MetricsBase_ARM MetricsBase_Arch = 1
MetricsBase_ARM64 MetricsBase_Arch = 2
MetricsBase_X86 MetricsBase_Arch = 3
MetricsBase_X86_64 MetricsBase_Arch = 4
)
var MetricsBase_ARCH_name = map[int32]string{
var MetricsBase_Arch_name = map[int32]string{
0: "UNKNOWN",
1: "ARM",
2: "ARM64",
3: "X86",
4: "X86_64",
}
var MetricsBase_ARCH_value = map[string]int32{
var MetricsBase_Arch_value = map[string]int32{
"UNKNOWN": 0,
"ARM": 1,
"ARM64": 2,
@ -82,63 +89,70 @@ var MetricsBase_ARCH_value = map[string]int32{
"X86_64": 4,
}
func (x MetricsBase_ARCH) Enum() *MetricsBase_ARCH {
p := new(MetricsBase_ARCH)
func (x MetricsBase_Arch) Enum() *MetricsBase_Arch {
p := new(MetricsBase_Arch)
*p = x
return p
}
func (x MetricsBase_ARCH) String() string {
return proto.EnumName(MetricsBase_ARCH_name, int32(x))
func (x MetricsBase_Arch) String() string {
return proto.EnumName(MetricsBase_Arch_name, int32(x))
}
func (x *MetricsBase_ARCH) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricsBase_ARCH_value, data, "MetricsBase_ARCH")
func (x *MetricsBase_Arch) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricsBase_Arch_value, data, "MetricsBase_Arch")
if err != nil {
return err
}
*x = MetricsBase_ARCH(value)
*x = MetricsBase_Arch(value)
return nil
}
func (MetricsBase_ARCH) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{0, 1}
func (MetricsBase_Arch) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{0, 1}
}
type ModuleTypeInfo_BUILDSYSTEM int32
type ModuleTypeInfo_BuildSystem int32
const (
ModuleTypeInfo_UNKNOWN ModuleTypeInfo_BUILDSYSTEM = 0
ModuleTypeInfo_SOONG ModuleTypeInfo_BUILDSYSTEM = 1
ModuleTypeInfo_MAKE ModuleTypeInfo_BUILDSYSTEM = 2
ModuleTypeInfo_UNKNOWN ModuleTypeInfo_BuildSystem = 0
ModuleTypeInfo_SOONG ModuleTypeInfo_BuildSystem = 1
ModuleTypeInfo_MAKE ModuleTypeInfo_BuildSystem = 2
)
var ModuleTypeInfo_BUILDSYSTEM_name = map[int32]string{
var ModuleTypeInfo_BuildSystem_name = map[int32]string{
0: "UNKNOWN",
1: "SOONG",
2: "MAKE",
}
var ModuleTypeInfo_BUILDSYSTEM_value = map[string]int32{
var ModuleTypeInfo_BuildSystem_value = map[string]int32{
"UNKNOWN": 0,
"SOONG": 1,
"MAKE": 2,
}
func (x ModuleTypeInfo_BUILDSYSTEM) Enum() *ModuleTypeInfo_BUILDSYSTEM {
p := new(ModuleTypeInfo_BUILDSYSTEM)
func (x ModuleTypeInfo_BuildSystem) Enum() *ModuleTypeInfo_BuildSystem {
p := new(ModuleTypeInfo_BuildSystem)
*p = x
return p
}
func (x ModuleTypeInfo_BUILDSYSTEM) String() string {
return proto.EnumName(ModuleTypeInfo_BUILDSYSTEM_name, int32(x))
func (x ModuleTypeInfo_BuildSystem) String() string {
return proto.EnumName(ModuleTypeInfo_BuildSystem_name, int32(x))
}
func (x *ModuleTypeInfo_BUILDSYSTEM) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ModuleTypeInfo_BUILDSYSTEM_value, data, "ModuleTypeInfo_BUILDSYSTEM")
func (x *ModuleTypeInfo_BuildSystem) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(ModuleTypeInfo_BuildSystem_value, data, "ModuleTypeInfo_BuildSystem")
if err != nil {
return err
}
*x = ModuleTypeInfo_BUILDSYSTEM(value)
*x = ModuleTypeInfo_BuildSystem(value)
return nil
}
func (ModuleTypeInfo_BUILDSYSTEM) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{2, 0}
func (ModuleTypeInfo_BuildSystem) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{2, 0}
}
type MetricsBase struct {
@ -151,17 +165,17 @@ type MetricsBase struct {
// The target product information, eg. aosp_arm.
TargetProduct *string `protobuf:"bytes,4,opt,name=target_product,json=targetProduct" json:"target_product,omitempty"`
// The target build variant information, eg. eng.
TargetBuildVariant *MetricsBase_BUILDVARIANT `protobuf:"varint,5,opt,name=target_build_variant,json=targetBuildVariant,enum=build_metrics.MetricsBase_BUILDVARIANT,def=2" json:"target_build_variant,omitempty"`
TargetBuildVariant *MetricsBase_BuildVariant `protobuf:"varint,5,opt,name=target_build_variant,json=targetBuildVariant,enum=soong_build_metrics.MetricsBase_BuildVariant,def=2" json:"target_build_variant,omitempty"`
// The target arch information, eg. arm.
TargetArch *MetricsBase_ARCH `protobuf:"varint,6,opt,name=target_arch,json=targetArch,enum=build_metrics.MetricsBase_ARCH,def=0" json:"target_arch,omitempty"`
TargetArch *MetricsBase_Arch `protobuf:"varint,6,opt,name=target_arch,json=targetArch,enum=soong_build_metrics.MetricsBase_Arch,def=0" json:"target_arch,omitempty"`
// The target arch variant information, eg. armv7-a-neon.
TargetArchVariant *string `protobuf:"bytes,7,opt,name=target_arch_variant,json=targetArchVariant" json:"target_arch_variant,omitempty"`
// The target cpu variant information, eg. generic.
TargetCpuVariant *string `protobuf:"bytes,8,opt,name=target_cpu_variant,json=targetCpuVariant" json:"target_cpu_variant,omitempty"`
// The host arch information, eg. x86_64.
HostArch *MetricsBase_ARCH `protobuf:"varint,9,opt,name=host_arch,json=hostArch,enum=build_metrics.MetricsBase_ARCH,def=0" json:"host_arch,omitempty"`
HostArch *MetricsBase_Arch `protobuf:"varint,9,opt,name=host_arch,json=hostArch,enum=soong_build_metrics.MetricsBase_Arch,def=0" json:"host_arch,omitempty"`
// The host 2nd arch information, eg. x86.
Host_2NdArch *MetricsBase_ARCH `protobuf:"varint,10,opt,name=host_2nd_arch,json=host2ndArch,enum=build_metrics.MetricsBase_ARCH,def=0" json:"host_2nd_arch,omitempty"`
Host_2NdArch *MetricsBase_Arch `protobuf:"varint,10,opt,name=host_2nd_arch,json=host2ndArch,enum=soong_build_metrics.MetricsBase_Arch,def=0" json:"host_2nd_arch,omitempty"`
// The host os information, eg. linux.
HostOs *string `protobuf:"bytes,11,opt,name=host_os,json=hostOs" json:"host_os,omitempty"`
// The host os extra information, eg. Linux-4.17.0-3rodete2-amd64-x86_64-Debian-GNU.
@ -191,16 +205,17 @@ func (m *MetricsBase) Reset() { *m = MetricsBase{} }
func (m *MetricsBase) String() string { return proto.CompactTextString(m) }
func (*MetricsBase) ProtoMessage() {}
func (*MetricsBase) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{0}
return fileDescriptor_6039342a2ba47b72, []int{0}
}
func (m *MetricsBase) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MetricsBase.Unmarshal(m, b)
}
func (m *MetricsBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MetricsBase.Marshal(b, m, deterministic)
}
func (dst *MetricsBase) XXX_Merge(src proto.Message) {
xxx_messageInfo_MetricsBase.Merge(dst, src)
func (m *MetricsBase) XXX_Merge(src proto.Message) {
xxx_messageInfo_MetricsBase.Merge(m, src)
}
func (m *MetricsBase) XXX_Size() int {
return xxx_messageInfo_MetricsBase.Size(m)
@ -211,10 +226,10 @@ func (m *MetricsBase) XXX_DiscardUnknown() {
var xxx_messageInfo_MetricsBase proto.InternalMessageInfo
const Default_MetricsBase_TargetBuildVariant MetricsBase_BUILDVARIANT = MetricsBase_ENG
const Default_MetricsBase_TargetArch MetricsBase_ARCH = MetricsBase_UNKNOWN
const Default_MetricsBase_HostArch MetricsBase_ARCH = MetricsBase_UNKNOWN
const Default_MetricsBase_Host_2NdArch MetricsBase_ARCH = MetricsBase_UNKNOWN
const Default_MetricsBase_TargetBuildVariant MetricsBase_BuildVariant = MetricsBase_ENG
const Default_MetricsBase_TargetArch MetricsBase_Arch = MetricsBase_UNKNOWN
const Default_MetricsBase_HostArch MetricsBase_Arch = MetricsBase_UNKNOWN
const Default_MetricsBase_Host_2NdArch MetricsBase_Arch = MetricsBase_UNKNOWN
func (m *MetricsBase) GetBuildDateTimestamp() int64 {
if m != nil && m.BuildDateTimestamp != nil {
@ -244,14 +259,14 @@ func (m *MetricsBase) GetTargetProduct() string {
return ""
}
func (m *MetricsBase) GetTargetBuildVariant() MetricsBase_BUILDVARIANT {
func (m *MetricsBase) GetTargetBuildVariant() MetricsBase_BuildVariant {
if m != nil && m.TargetBuildVariant != nil {
return *m.TargetBuildVariant
}
return Default_MetricsBase_TargetBuildVariant
}
func (m *MetricsBase) GetTargetArch() MetricsBase_ARCH {
func (m *MetricsBase) GetTargetArch() MetricsBase_Arch {
if m != nil && m.TargetArch != nil {
return *m.TargetArch
}
@ -272,14 +287,14 @@ func (m *MetricsBase) GetTargetCpuVariant() string {
return ""
}
func (m *MetricsBase) GetHostArch() MetricsBase_ARCH {
func (m *MetricsBase) GetHostArch() MetricsBase_Arch {
if m != nil && m.HostArch != nil {
return *m.HostArch
}
return Default_MetricsBase_HostArch
}
func (m *MetricsBase) GetHost_2NdArch() MetricsBase_ARCH {
func (m *MetricsBase) GetHost_2NdArch() MetricsBase_Arch {
if m != nil && m.Host_2NdArch != nil {
return *m.Host_2NdArch
}
@ -378,16 +393,17 @@ func (m *PerfInfo) Reset() { *m = PerfInfo{} }
func (m *PerfInfo) String() string { return proto.CompactTextString(m) }
func (*PerfInfo) ProtoMessage() {}
func (*PerfInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{1}
return fileDescriptor_6039342a2ba47b72, []int{1}
}
func (m *PerfInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PerfInfo.Unmarshal(m, b)
}
func (m *PerfInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PerfInfo.Marshal(b, m, deterministic)
}
func (dst *PerfInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PerfInfo.Merge(dst, src)
func (m *PerfInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_PerfInfo.Merge(m, src)
}
func (m *PerfInfo) XXX_Size() int {
return xxx_messageInfo_PerfInfo.Size(m)
@ -435,7 +451,7 @@ func (m *PerfInfo) GetMemoryUse() uint64 {
type ModuleTypeInfo struct {
// The build system, eg. Soong or Make.
BuildSystem *ModuleTypeInfo_BUILDSYSTEM `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=build_metrics.ModuleTypeInfo_BUILDSYSTEM,def=0" json:"build_system,omitempty"`
BuildSystem *ModuleTypeInfo_BuildSystem `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=soong_build_metrics.ModuleTypeInfo_BuildSystem,def=0" json:"build_system,omitempty"`
// The module type, eg. java_library, cc_binary, and etc.
ModuleType *string `protobuf:"bytes,2,opt,name=module_type,json=moduleType" json:"module_type,omitempty"`
// The number of logical modules.
@ -449,16 +465,17 @@ func (m *ModuleTypeInfo) Reset() { *m = ModuleTypeInfo{} }
func (m *ModuleTypeInfo) String() string { return proto.CompactTextString(m) }
func (*ModuleTypeInfo) ProtoMessage() {}
func (*ModuleTypeInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_9e7b895801991242, []int{2}
return fileDescriptor_6039342a2ba47b72, []int{2}
}
func (m *ModuleTypeInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModuleTypeInfo.Unmarshal(m, b)
}
func (m *ModuleTypeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModuleTypeInfo.Marshal(b, m, deterministic)
}
func (dst *ModuleTypeInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModuleTypeInfo.Merge(dst, src)
func (m *ModuleTypeInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModuleTypeInfo.Merge(m, src)
}
func (m *ModuleTypeInfo) XXX_Size() int {
return xxx_messageInfo_ModuleTypeInfo.Size(m)
@ -469,9 +486,9 @@ func (m *ModuleTypeInfo) XXX_DiscardUnknown() {
var xxx_messageInfo_ModuleTypeInfo proto.InternalMessageInfo
const Default_ModuleTypeInfo_BuildSystem ModuleTypeInfo_BUILDSYSTEM = ModuleTypeInfo_UNKNOWN
const Default_ModuleTypeInfo_BuildSystem ModuleTypeInfo_BuildSystem = ModuleTypeInfo_UNKNOWN
func (m *ModuleTypeInfo) GetBuildSystem() ModuleTypeInfo_BUILDSYSTEM {
func (m *ModuleTypeInfo) GetBuildSystem() ModuleTypeInfo_BuildSystem {
if m != nil && m.BuildSystem != nil {
return *m.BuildSystem
}
@ -493,65 +510,65 @@ func (m *ModuleTypeInfo) GetNumOfModules() uint32 {
}
func init() {
proto.RegisterType((*MetricsBase)(nil), "build_metrics.MetricsBase")
proto.RegisterType((*PerfInfo)(nil), "build_metrics.PerfInfo")
proto.RegisterType((*ModuleTypeInfo)(nil), "build_metrics.ModuleTypeInfo")
proto.RegisterEnum("build_metrics.MetricsBase_BUILDVARIANT", MetricsBase_BUILDVARIANT_name, MetricsBase_BUILDVARIANT_value)
proto.RegisterEnum("build_metrics.MetricsBase_ARCH", MetricsBase_ARCH_name, MetricsBase_ARCH_value)
proto.RegisterEnum("build_metrics.ModuleTypeInfo_BUILDSYSTEM", ModuleTypeInfo_BUILDSYSTEM_name, ModuleTypeInfo_BUILDSYSTEM_value)
proto.RegisterEnum("soong_build_metrics.MetricsBase_BuildVariant", MetricsBase_BuildVariant_name, MetricsBase_BuildVariant_value)
proto.RegisterEnum("soong_build_metrics.MetricsBase_Arch", MetricsBase_Arch_name, MetricsBase_Arch_value)
proto.RegisterEnum("soong_build_metrics.ModuleTypeInfo_BuildSystem", ModuleTypeInfo_BuildSystem_name, ModuleTypeInfo_BuildSystem_value)
proto.RegisterType((*MetricsBase)(nil), "soong_build_metrics.MetricsBase")
proto.RegisterType((*PerfInfo)(nil), "soong_build_metrics.PerfInfo")
proto.RegisterType((*ModuleTypeInfo)(nil), "soong_build_metrics.ModuleTypeInfo")
}
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_metrics_9e7b895801991242) }
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
var fileDescriptor_metrics_9e7b895801991242 = []byte{
// 783 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0xdb, 0x36,
0x14, 0xae, 0x62, 0x25, 0x96, 0x8e, 0x62, 0x57, 0x61, 0x02, 0x44, 0xc5, 0x50, 0x34, 0x30, 0xf6,
0x93, 0x01, 0x9b, 0x57, 0x18, 0x81, 0x11, 0x04, 0xbb, 0xb1, 0x13, 0xa3, 0x35, 0x5a, 0xdb, 0x85,
0x6c, 0x67, 0xdd, 0x2e, 0x46, 0x68, 0x12, 0xdd, 0x68, 0xb3, 0x44, 0x81, 0xa4, 0x8a, 0xf9, 0x21,
0xf6, 0x8c, 0x7b, 0x91, 0x5d, 0x0c, 0x3c, 0xb4, 0x5c, 0xa5, 0x17, 0x29, 0x72, 0x47, 0x9d, 0xef,
0x87, 0xdf, 0x91, 0xc8, 0x23, 0x68, 0x65, 0x4c, 0x89, 0x34, 0x96, 0xdd, 0x42, 0x70, 0xc5, 0x49,
0xeb, 0x8f, 0x32, 0x5d, 0x27, 0x74, 0x5b, 0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7, 0x82, 0xf6, 0x84, 0x27, 0xe5, 0x9a, 0x2d, 0x36, 0x05, 0xc3, 0x54, 0x4b, 0x38, 0x34, 0xef,
0x4d, 0x6e, 0xa4, 0x62, 0x19, 0xa6, 0x6b, 0xf7, 0xbe, 0xff, 0xfc, 0x42, 0xdc, 0x13, 0x99, 0xe1,
0x32, 0xff, 0x75, 0xbe, 0x18, 0x4d, 0x6a, 0x57, 0x03, 0x25, 0x73, 0xb4, 0x21, 0x2f, 0xc0, 0xcb,
0x50, 0x43, 0xd5, 0xa6, 0xa8, 0xfa, 0x83, 0x6c, 0x67, 0x43, 0xbe, 0x86, 0x76, 0x5e, 0x66, 0x94,
0xaf, 0xa8, 0x29, 0x4a, 0xec, 0xb4, 0x15, 0x1e, 0xe6, 0x65, 0x36, 0x5b, 0x99, 0xfd, 0x64, 0xe7,
0x27, 0xf0, 0x6a, 0x7b, 0xdd, 0xff, 0x0a, 0x2e, 0xec, 0xcf, 0x67, 0xb3, 0xa9, 0xfe, 0x5c, 0x0e,
0xd8, 0x93, 0xc1, 0x9b, 0x91, 0xbf, 0x37, 0x3c, 0x7a, 0xdd, 0xf8, 0xad, 0xfa, 0x25, 0x50, 0xfc,
0x25, 0xfc, 0x1f, 0x00, 0x00, 0xff, 0xff, 0xd4, 0x8d, 0x19, 0x89, 0x22, 0x06, 0x00, 0x00,
var fileDescriptor_6039342a2ba47b72 = []byte{
// 769 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x6f, 0x6b, 0xdb, 0x46,
0x18, 0xaf, 0x62, 0x25, 0x96, 0x1e, 0xc5, 0xae, 0x7a, 0xc9, 0xa8, 0xca, 0x08, 0x33, 0x66, 0x1d,
0x7e, 0xb1, 0xba, 0xc5, 0x14, 0x53, 0x4c, 0x19, 0xd8, 0x89, 0x29, 0x25, 0xd8, 0x2e, 0x4a, 0xdc,
0x95, 0xed, 0xc5,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84, 0xc2, 0x71, 0x86, 0x73,
0xc7, 0x0e, 0x5d, 0xac, 0xe8, 0x29, 0x46, 0xbe, 0x07, 0x57, 0xb0, 0x68, 0x6b, 0x50, 0x1b, 0x51,
0x47, 0x17, 0x10, 0x3c, 0x03, 0xc8, 0x58, 0xc6, 0xc5, 0x8e, 0x96, 0x92, 0xe1, 0x54, 0xb1, 0x43,
0xd7, 0x54, 0xd6, 0x92, 0xf5, 0xff, 0xb5, 0xa0, 0xbb, 0xe0, 0x49, 0xb9, 0x65, 0xd7, 0xbb, 0x82,
0x61, 0xaa, 0xdf, 0xe1, 0xd8, 0x9c, 0x9b, 0xdc, 0x49, 0xc5, 0x32, 0x4c, 0xd7, 0x1d, 0xbd, 0xbc,
0xff, 0xba, 0xdc, 0x91, 0x9a, 0x61, 0x74, 0x85, 0xb2, 0xc6, 0xc5, 0xf9, 0x7c, 0x5b, 0x25, 0x3f,
0x80, 0x97, 0xa1, 0x86, 0xaa, 0x5d, 0x51, 0x77, 0x09, 0xd9, 0xde, 0x86, 0xfc, 0x08, 0xdd, 0xbc,
0xcc, 0x28, 0xdf, 0x50, 0x53, 0x94, 0xd8, 0x6f, 0x27, 0x3c, 0xce, 0xcb, 0x6c, 0xb5, 0x31, 0xfb,
0xc9, 0xfe, 0x4b, 0xf0, 0x1a, 0x7b, 0xdd, 0x7d, 0x17, 0x2e, 0x1c, 0x5e, 0xad, 0x56, 0x4b, 0xfd,
0xd2, 0x1c, 0xb0, 0x17, 0xd3, 0xcb, 0xb9, 0x7f, 0x30, 0xfb, 0xee, 0xb7, 0xea, 0xef, 0x51, 0x25,
0xa7, 0xf8, 0x4b, 0xf9, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x81, 0xd0, 0x84, 0x23, 0x62, 0x06, 0x00,
0x00,
}

View File

@ -14,10 +14,8 @@
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package build_metrics;
option go_package = "metrics_proto";
package soong_build_metrics;
option go_package = "soong_metrics_proto";
message MetricsBase {
// Timestamp generated when the build starts.
@ -32,15 +30,15 @@ message MetricsBase {
// The target product information, eg. aosp_arm.
optional string target_product = 4;
enum BUILDVARIANT {
enum BuildVariant {
USER = 0;
USERDEBUG = 1;
ENG = 2;
}
// The target build variant information, eg. eng.
optional BUILDVARIANT target_build_variant = 5 [default = ENG];
optional BuildVariant target_build_variant = 5 [default = ENG];
enum ARCH {
enum Arch {
UNKNOWN = 0;
ARM = 1;
ARM64 = 2;
@ -48,7 +46,7 @@ message MetricsBase {
X86_64 = 4;
}
// The target arch information, eg. arm.
optional ARCH target_arch = 6 [default = UNKNOWN];
optional Arch target_arch = 6 [default = UNKNOWN];
// The target arch variant information, eg. armv7-a-neon.
optional string target_arch_variant = 7;
@ -57,10 +55,10 @@ message MetricsBase {
optional string target_cpu_variant = 8;
// The host arch information, eg. x86_64.
optional ARCH host_arch = 9 [default = UNKNOWN];
optional Arch host_arch = 9 [default = UNKNOWN];
// The host 2nd arch information, eg. x86.
optional ARCH host_2nd_arch = 10 [default = UNKNOWN];
optional Arch host_2nd_arch = 10 [default = UNKNOWN];
// The host os information, eg. linux.
optional string host_os = 11;
@ -113,13 +111,13 @@ message PerfInfo {
}
message ModuleTypeInfo {
enum BUILDSYSTEM {
enum BuildSystem {
UNKNOWN = 0;
SOONG = 1;
MAKE = 2;
}
// The build system, eg. Soong or Make.
optional BUILDSYSTEM build_system = 1 [default = UNKNOWN];
optional BuildSystem build_system = 1 [default = UNKNOWN];
// The module type, eg. java_library, cc_binary, and etc.
optional string module_type = 2;

View File

@ -30,7 +30,7 @@ type timeEvent struct {
type TimeTracer interface {
Begin(name, desc string, thread tracer.Thread)
End(thread tracer.Thread) metrics_proto.PerfInfo
End(thread tracer.Thread) soong_metrics_proto.PerfInfo
}
type timeTracerImpl struct {
@ -51,11 +51,11 @@ func (t *timeTracerImpl) beginAt(name, desc string, atNanos uint64) {
t.activeEvents = append(t.activeEvents, timeEvent{name: name, desc: desc, atNanos: atNanos})
}
func (t *timeTracerImpl) End(thread tracer.Thread) metrics_proto.PerfInfo {
func (t *timeTracerImpl) End(thread tracer.Thread) soong_metrics_proto.PerfInfo {
return t.endAt(t.now())
}
func (t *timeTracerImpl) endAt(atNanos uint64) metrics_proto.PerfInfo {
func (t *timeTracerImpl) endAt(atNanos uint64) soong_metrics_proto.PerfInfo {
if len(t.activeEvents) < 1 {
panic("Internal error: No pending events for endAt to end!")
}
@ -63,7 +63,7 @@ func (t *timeTracerImpl) endAt(atNanos uint64) metrics_proto.PerfInfo {
t.activeEvents = t.activeEvents[:len(t.activeEvents)-1]
realTime := atNanos - lastEvent.atNanos
return metrics_proto.PerfInfo{
return soong_metrics_proto.PerfInfo{
Desc: &lastEvent.desc,
Name: &lastEvent.name,
StartTime: &lastEvent.atNanos,