Add skip-metrics-upload flag to soong_ui.
Bug: b/261203925 Test: m libcore --skip-metrics-upload Change-Id: I0b10027a0f359e682116c2ebb884808c65430dd0
This commit is contained in:
@@ -215,7 +215,11 @@ func main() {
|
|||||||
soongMetricsFile, // high level metrics related to this build system.
|
soongMetricsFile, // high level metrics related to this build system.
|
||||||
config.BazelMetricsDir(), // directory that contains a set of bazel metrics.
|
config.BazelMetricsDir(), // directory that contains a set of bazel metrics.
|
||||||
}
|
}
|
||||||
defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, files...)
|
|
||||||
|
if !config.SkipMetricsUpload() {
|
||||||
|
defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, files...)
|
||||||
|
}
|
||||||
|
|
||||||
defer met.Dump(soongMetricsFile)
|
defer met.Dump(soongMetricsFile)
|
||||||
defer build.CheckProdCreds(buildCtx, config)
|
defer build.CheckProdCreds(buildCtx, config)
|
||||||
}
|
}
|
||||||
|
@@ -65,24 +65,25 @@ type configImpl struct {
|
|||||||
buildDateTime string
|
buildDateTime string
|
||||||
|
|
||||||
// From the arguments
|
// From the arguments
|
||||||
parallel int
|
parallel int
|
||||||
keepGoing int
|
keepGoing int
|
||||||
verbose bool
|
verbose bool
|
||||||
checkbuild bool
|
checkbuild bool
|
||||||
dist bool
|
dist bool
|
||||||
jsonModuleGraph bool
|
jsonModuleGraph bool
|
||||||
apiBp2build bool // Generate BUILD files for Soong modules that contribute APIs
|
apiBp2build bool // Generate BUILD files for Soong modules that contribute APIs
|
||||||
bp2build bool
|
bp2build bool
|
||||||
queryview bool
|
queryview bool
|
||||||
reportMkMetrics bool // Collect and report mk2bp migration progress metrics.
|
reportMkMetrics bool // Collect and report mk2bp migration progress metrics.
|
||||||
soongDocs bool
|
soongDocs bool
|
||||||
skipConfig bool
|
skipConfig bool
|
||||||
skipKati bool
|
skipKati bool
|
||||||
skipKatiNinja bool
|
skipKatiNinja bool
|
||||||
skipSoong bool
|
skipSoong bool
|
||||||
skipNinja bool
|
skipNinja bool
|
||||||
skipSoongTests bool
|
skipSoongTests bool
|
||||||
searchApiDir bool // Scan the Android.bp files generated in out/api_surfaces
|
searchApiDir bool // Scan the Android.bp files generated in out/api_surfaces
|
||||||
|
skipMetricsUpload bool
|
||||||
|
|
||||||
// From the product config
|
// From the product config
|
||||||
katiArgs []string
|
katiArgs []string
|
||||||
@@ -735,6 +736,8 @@ func (c *configImpl) parseArgs(ctx Context, args []string) {
|
|||||||
c.skipConfig = true
|
c.skipConfig = true
|
||||||
} else if arg == "--skip-soong-tests" {
|
} else if arg == "--skip-soong-tests" {
|
||||||
c.skipSoongTests = true
|
c.skipSoongTests = true
|
||||||
|
} else if arg == "--skip-metrics-upload" {
|
||||||
|
c.skipMetricsUpload = true
|
||||||
} else if arg == "--mk-metrics" {
|
} else if arg == "--mk-metrics" {
|
||||||
c.reportMkMetrics = true
|
c.reportMkMetrics = true
|
||||||
} else if arg == "--bazel-mode" {
|
} else if arg == "--bazel-mode" {
|
||||||
@@ -1512,6 +1515,10 @@ func (c *configImpl) BazelModulesForceEnabledByFlag() string {
|
|||||||
return c.bazelForceEnabledModules
|
return c.bazelForceEnabledModules
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *configImpl) SkipMetricsUpload() bool {
|
||||||
|
return c.skipMetricsUpload
|
||||||
|
}
|
||||||
|
|
||||||
func GetMetricsUploader(topDir string, env *Environment) string {
|
func GetMetricsUploader(topDir string, env *Environment) string {
|
||||||
if p, ok := env.Get("METRICS_UPLOADER"); ok {
|
if p, ok := env.Get("METRICS_UPLOADER"); ok {
|
||||||
metricsUploader := filepath.Join(topDir, p)
|
metricsUploader := filepath.Join(topDir, p)
|
||||||
|
Reference in New Issue
Block a user