summaryrefslogtreecommitdiffstats
path: root/vespabase
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-08 10:54:00 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-08 10:54:00 +0000
commitd51d70ed19109c66dd6c8b2e072dd841399efa57 (patch)
treee1b229f6ec5dbf1d13389342eb86bae7c847f928 /vespabase
parentae04032d7ebef5f642d2f1a3d96c6853342b43db (diff)
Do not override if VESPA_TIMER_HZ has been set already
Diffstat (limited to 'vespabase')
-rwxr-xr-xvespabase/src/common-env.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/vespabase/src/common-env.sh b/vespabase/src/common-env.sh
index f2142fc4987..5f2646ff83c 100755
--- a/vespabase/src/common-env.sh
+++ b/vespabase/src/common-env.sh
@@ -118,10 +118,14 @@ add_valgrind_suppressions_file() {
}
optionally_reduce_base_frequency() {
- os_release=`uname -r`
- if [[ "$os_release" == *linuxkit* ]]; then
- export VESPA_TIMER_HZ=100
- : "Running docker on macos. Reducing base frequency from 1000hz to 100hz due to high cost of sampling time. This will reduce timeout accuracy. VESPA_TIMER_HZ=$VESPA_TIMER_HZ"
+ if [ -z "$VESPA_TIMER_HZ" ]; then
+ os_release=`uname -r`
+ if [[ "$os_release" == *linuxkit* ]]; then
+ export VESPA_TIMER_HZ=100
+ : "Running docker on macos. Reducing base frequency from 1000hz to 100hz due to high cost of sampling time. This will reduce timeout accuracy. VESPA_TIMER_HZ=$VESPA_TIMER_HZ"
+ fi
+ else
+ : "VESPA_TIMER_HZ already set to $VESPA_TIMER_HZ. Skipping auto detection."
fi
}