Lines Matching refs:m
43 m := &Metrics{
47 return m
50 func (m *Metrics) SetTimeMetrics(perf soong_metrics_proto.PerfInfo) {
53 m.metrics.KatiRuns = append(m.metrics.KatiRuns, &perf)
56 m.metrics.SoongRuns = append(m.metrics.SoongRuns, &perf)
59 m.metrics.NinjaRuns = append(m.metrics.NinjaRuns, &perf)
62 m.metrics.Total = &perf
68 func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
72 m.metrics.BuildId = proto.String(v)
75 m.metrics.PlatformVersionCodename = proto.String(v)
78 m.metrics.TargetProduct = proto.String(v)
83 m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_USER.Enum()
85 m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_USERDEBUG.Enum()
87 m.metrics.TargetBuildVariant = soong_metrics_proto.MetricsBase_ENG.Enum()
92 m.metrics.TargetArch = m.getArch(v)
94 m.metrics.TargetArchVariant = proto.String(v)
96 m.metrics.TargetCpuVariant = proto.String(v)
98 m.metrics.HostArch = m.getArch(v)
100 m.metrics.Host_2NdArch = m.getArch(v)
102 m.metrics.HostOs = proto.String(v)
104 m.metrics.HostOsExtra = proto.String(v)
106 m.metrics.HostCrossOs = proto.String(v)
108 m.metrics.HostCrossArch = proto.String(v)
110 m.metrics.HostCross_2NdArch = proto.String(v)
112 m.metrics.OutDir = proto.String(v)
119 func (m *Metrics) getArch(arch string) *soong_metrics_proto.MetricsBase_Arch {
134 func (m *Metrics) SetBuildDateTime(buildTimestamp time.Time) {
135 m.metrics.BuildDateTimestamp = proto.Int64(buildTimestamp.UnixNano() / int64(time.Second))
139 func (m *Metrics) Dump(outputPath string) (err error) {
140 return writeMessageToFile(&m.metrics, outputPath)
143 func (m *Metrics) SetSoongBuildMetrics(metrics *soong_metrics_proto.SoongBuildMetrics) {
144 m.metrics.SoongBuildMetrics = metrics