fix: fix shellcheck errors, minor improvements

This commit is contained in:
gmega 2025-06-25 20:01:33 -03:00
parent f57808f751
commit 2fde22116c
No known key found for this signature in database
GPG Key ID: 6290D34EAD824B18
3 changed files with 14 additions and 4 deletions

View File

@ -11,13 +11,20 @@
set -e -o pipefail set -e -o pipefail
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=./src/clh
source "${SCRIPT_DIR}/../src/clh" source "${SCRIPT_DIR}/../src/clh"
node_count="${1:-2}" node_count="${1:-2}"
repetitions="${2:-1}" repetitions="${2:-1}"
output_log="${3:-"${OUTPUTS}/k-node-$(date +%s)-${RANDOM}.csv"}" output_log="${3:-"${OUTPUTS}/k-node-$(date +%s)-${RANDOM}.csv"}"
shift 3 if [ "$#" -gt 3 ]; then
file_sizes=("$@") shift 3
file_sizes=("$@")
else
echoerr "No file sizes specified, using default (100)."
file_sizes=("100")
fi
exp_start "k-node" exp_start "k-node"

View File

@ -14,4 +14,7 @@ source "${LIB_SRC}/experiment.bash"
exp_set_outputs "${OUTPUTS}" exp_set_outputs "${OUTPUTS}"
prom_set_outputs "${PROM_TARGETS_DIR}" prom_set_outputs "${PROM_TARGETS_DIR}"
exp_start "default" # If running from an interactive shell, fire the default experiment.
if [[ $- =~ i ]]; then
exp_start "default"
fi

View File

@ -259,7 +259,7 @@ await_all() {
_pm_job_started() { _pm_job_started() {
local pid=$1 proc_type=$2 local pid=$1 proc_type=$2
shift 2 shift 2
echoerr "[procmon] job started: $pid ($proc_type), args: $*" echoerr "[procmon] job started: $pid ($proc_type), args: ${*:-<no args>}"
if [ ! -f "${_pm_output}/${pid}.pid" ]; then if [ ! -f "${_pm_output}/${pid}.pid" ]; then
touch "${_pm_output}/${pid}.pid" touch "${_pm_output}/${pid}.pid"
fi fi