summaryrefslogtreecommitdiff
path: root/shared/paths.go
diff options
context:
space:
mode:
Diffstat (limited to 'shared/paths.go')
-rw-r--r--shared/paths.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/shared/paths.go b/shared/paths.go
index f5dc5ac44..24ba057aa 100644
--- a/shared/paths.go
+++ b/shared/paths.go
@@ -24,3 +24,17 @@ import (
func TempDirForOutDir(outDir string) (tempPath string) {
return filepath.Join(outDir, ".temp")
}
+
+// BazelMetricsDir returns the path where a set of bazel profile
+// files are stored for later processed by the metrics pipeline.
+func BazelMetricsDir(outDir string) string {
+ return filepath.Join(outDir, "bazel_metrics")
+}
+
+// BazelMetricsFilename returns the bazel profile filename based
+// on the action name. This is to help to store a set of bazel
+// profiles since bazel may execute multiple times during a single
+// build.
+func BazelMetricsFilename(outDir, actionName string) string {
+ return filepath.Join(BazelMetricsDir(outDir), actionName+"_bazel_profile.gz")
+}