diff options
Diffstat (limited to 'vespabase')
-rwxr-xr-x | vespabase/src/common-env.sh | 12 |
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 } |