platform_build_soong/bazel/constants.go
Patrice Arruda 05ab2d0731 Enable bazel profiling in soong_build.
Bazel is executed several times during the execution of soong_build.
For each bazel execution, generate a profile and save under the
BAZEL_METRICS_DIR which is defined in soong_ui.

Bug: b/174479924
Test: * USE_BAZEL_ANALYSIS=1 USE_BAZEL=1 m nothing and checked
        if the cquery and graph build bazel profiles were generated.
      * Verified that the generated bazel profiles were uploaded
        to the local dev metrics pipeline.

Change-Id: I3d20204484dc6c5a1525a5d3eec1d62cfb33535b
2020-12-14 18:48:11 +00:00

26 lines
819 B
Go

package bazel
type RunName string
// Below is a list bazel execution run names used through out the
// Platform Build systems. Each run name represents an unique key
// to query the bazel metrics.
const (
// Perform a bazel build of the phony root to generate symlink forests
// for dependencies of the bazel build.
BazelBuildPhonyRootRunName = RunName("bazel-build-phony-root")
// Perform aquery of the bazel build root to retrieve action information.
AqueryBuildRootRunName = RunName("aquery-buildroot")
// Perform cquery of the Bazel build root and its dependencies.
CqueryBuildRootRunName = RunName("cquery-buildroot")
// Run bazel as a ninja executer
BazelNinjaExecRunName = RunName("bazel-ninja-exec")
)
// String returns the name of the run.
func (c RunName) String() string {
return string(c)
}