Do not override if VESPA_TIMER_HZ has been set already
@@ -118,11 +118,15 @@ add_valgrind_suppressions_file() {
}
optionally_reduce_base_frequency() {
+ 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
}
populate_environment
