Resolve metrics_proto warning
Bug: 271526845 Test: manually invoke internal protobuf presubmit Change-Id: I79d1cc027e422fa1ca6106f5b45ef11045f6d486
This commit is contained in:
@@ -541,14 +541,14 @@ func storeConfigMetrics(ctx Context, config Config) {
|
||||
ctx.Metrics.SystemResourceInfo(s)
|
||||
}
|
||||
|
||||
func getNinjaWeightListSourceInMetric(s NinjaWeightListSource) *smpb.NinjaWeightListSource {
|
||||
func getNinjaWeightListSourceInMetric(s NinjaWeightListSource) *smpb.BuildConfig_NinjaWeightListSource {
|
||||
switch s {
|
||||
case NINJA_LOG:
|
||||
return smpb.NinjaWeightListSource_NINJA_LOG.Enum()
|
||||
return smpb.BuildConfig_NINJA_LOG.Enum()
|
||||
case EVENLY_DISTRIBUTED:
|
||||
return smpb.NinjaWeightListSource_EVENLY_DISTRIBUTED.Enum()
|
||||
return smpb.BuildConfig_EVENLY_DISTRIBUTED.Enum()
|
||||
default:
|
||||
return smpb.NinjaWeightListSource_NOT_USED.Enum()
|
||||
return smpb.BuildConfig_NOT_USED.Enum()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1032,7 +1032,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1044,7 +1044,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1056,7 +1056,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1068,7 +1068,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(true),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1080,7 +1080,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(true),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1093,7 +1093,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1106,7 +1106,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(true),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1119,7 +1119,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(true),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1132,7 +1132,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(false),
|
||||
BazelMixedBuild: proto.Bool(true),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1147,7 +1147,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
BazelMixedBuild: proto.Bool(false),
|
||||
Targets: []string{"droid", "dist"},
|
||||
ForceDisableBazelMixedBuild: proto.Bool(false),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -1166,7 +1166,7 @@ func TestBuildConfig(t *testing.T) {
|
||||
UseRbe: proto.Bool(true),
|
||||
BazelMixedBuild: proto.Bool(true),
|
||||
ForceDisableBazelMixedBuild: proto.Bool(true),
|
||||
NinjaWeightListSource: smpb.NinjaWeightListSource_NOT_USED.Enum(),
|
||||
NinjaWeightListSource: smpb.BuildConfig_NOT_USED.Enum(),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user