Pass along local resource fraction to reproxy am: dbc313375a
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/19049588 Change-Id: Ife8306fa56df31d9c023436d32765fbe14fbff22 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
@@ -87,6 +88,13 @@ func getRBEVars(ctx Context, config Config) map[string]string {
|
||||
}
|
||||
vars["RBE_server_address"] = fmt.Sprintf("unix://%v", name)
|
||||
}
|
||||
|
||||
rf := 1.0
|
||||
if config.Parallel() < runtime.NumCPU() {
|
||||
rf = float64(config.Parallel()) / float64(runtime.NumCPU())
|
||||
}
|
||||
vars["RBE_local_resource_fraction"] = fmt.Sprintf("%.2f", rf)
|
||||
|
||||
k, v := config.rbeAuth()
|
||||
vars[k] = v
|
||||
return vars
|
||||
|
Reference in New Issue
Block a user