diff options
author | 2020-07-10 23:22:49 +0000 | |
---|---|---|
committer | 2020-07-10 23:22:49 +0000 | |
commit | d990f70fa2ef691c3a3c32ee319743847de7e411 (patch) | |
tree | f33e4fd06755b8b718c450d31c68388033c8257d /rbesetup.sh | |
parent | f7d4d1e88568745eb48808c9dfffd5b605376b15 (diff) |
Set ANDROID_ENABLE_METRICS_UPLOAD to the metrics_uploader path to upload metrics.
This is to collect metrics from our RBE dogfooders. This CL will be
rolledback once the metrics pipeline is turned live.
Bug: b/140638454
Test: source the script and then "m nothing". Monitored the uploading
of the metrics.
Change-Id: Ide996a44a5a651ed026d7c8272283675fbb092b5
Diffstat (limited to 'rbesetup.sh')
-rw-r--r-- | rbesetup.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/rbesetup.sh b/rbesetup.sh index 145e1e8261..f9317a324f 100644 --- a/rbesetup.sh +++ b/rbesetup.sh @@ -23,3 +23,14 @@ function use_rbe() { RBE_re_proxy="${RBE_BINARIES_DIR}/reproxy" \ $@ } + +# This function detects if the uploader is available and sets the path of it to +# ANDROID_ENABLE_METRICS_UPLOAD. +function _export_metrics_uploader() { + local uploader_path="$(gettop)/vendor/google/misc/metrics_uploader_prebuilt/metrics_uploader.sh" + if [ -x "${uploader_path}" ]; then + export ANDROID_ENABLE_METRICS_UPLOAD="${uploader_path}" + fi +} + +_export_metrics_uploader |