Skip to content

Commit

Permalink
list all output files
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Jul 29, 2024
1 parent 1f85755 commit ad97f82
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion perfmetrics/scripts/testing_on_gke/examples/run-gke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,13 +269,31 @@ function enableManagedCsiDriverIfNeeded() {
fi
}

function dataLoaderBucketNames() {
local workloadConfigFileName="$1"
for workloadFileName in "${workloadConfigFileName}" ; do
workloadConfigFilePath="${gke_testing_dir}"/examples/$workloadFileName
if test -f "${workloadConfigFilePath}"; then
grep -wh '\"bucket\"' "${workloadConfigFilePath}" | cut -d: -f2 | cut -d, -f1 | cut -d \" -f2 | sort | uniq | grep -v ' ' | sort | uniq
fi
done
}

function fioDataLoaderBucketNames() {
dataLoaderBucketNames fio/workloads.json
}

function dlioDataLoaderBucketNames() {
dataLoaderBucketNames dlio/workloads.json
}

function configureClusterCredentials() {
echo "Configuring cluster credentials ..."
gcloud container clusters get-credentials ${cluster_name} --location=${zone}
kubectl create namespace ${appnamespace}
kubectl create serviceaccount ${ksa} --namespace ${appnamespace}

for workloadFileName in fio/workloads.json fio/workloads.json ; do
for workloadFileName in fio/workloads.json dlio/workloads.json ; do
workloadConfigFilePath="${gke_testing_dir}"/examples/$workloadFileName
if test -f "${workloadConfigFilePath}"; then
grep -wh '\"bucket\"' "${workloadConfigFilePath}" | cut -d: -f2 | cut -d, -f1 | cut -d \" -f2 | sort | uniq | grep -v ' ' | \
Expand Down Expand Up @@ -469,6 +487,19 @@ function updateGcsfuseMountOptionsInPodConfigs() {
done
}

function printOutputFilesList() {
echo "fio data-loader outputs:"
fioDataLoaderBucketNames | while read bucket ; do
echo "bucket=${bucket}"
gcloud storage ls -l gs://${bucket}/fio-output/*/* | grep json
done
echo "dlio data-loader outputs:"
dlioDataLoaderBucketNames | while read bucket ; do
echo "bucket=${bucket}"
gcloud storage ls -l gs://${bucket}/logs/*/*/* | grep json
done
}

printRunParameters
# validateMachineConfig ${machine_type} ${num_nodes} ${num_ssd}
# installDependencies
Expand Down

0 comments on commit ad97f82

Please sign in to comment.