Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the spreadsheetId argument optional #2012

Merged
merged 8 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions perfmetrics/scripts/fetch_and_upload_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ def _parse_arguments(argv):
)

parser.add_argument(
'spreadsheet_id',
'--spreadsheet_id',
help='Provide id of spreadsheet',
action='store',
default="",
required=False,
)

return parser.parse_args(argv[1:])
Expand All @@ -100,7 +102,7 @@ def _parse_arguments(argv):

if args.upload_gs:
gsheet.write_to_google_sheet(FIO_WORKSHEET_NAME, metrics_data,
args.spreadsheet_id)
args.spreadsheet_id)

if args.upload_bq:
if not args.config_id or not args.start_time_build:
Expand Down
6 changes: 4 additions & 2 deletions perfmetrics/scripts/ls_metrics/listing_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,9 +500,11 @@ def _parse_arguments(argv):
)

parser.add_argument(
'spreadsheet_id',
'--spreadsheet_id',
help='Provide id of spreadsheet',
action='store',
default="",
Tulsishah marked this conversation as resolved.
Show resolved Hide resolved
required=False,
)
# Ignoring the first parameter, as it is the path of this python
# script itself.
Expand Down Expand Up @@ -568,7 +570,7 @@ def _export_to_bigquery(test_type, config_id, start_time_build, ls_data):
if len(argv) < 4:
Tulsishah marked this conversation as resolved.
Show resolved Hide resolved
raise TypeError('Incorrect number of arguments.\n'
'Usage: '
'python3 listing_benchmark.py [--keep_files] [--upload_gs] [--num_samples NUM_SAMPLES] [--message MESSAGE] --gcsfuse_flags GCSFUSE_FLAGS --command COMMAND config_file spreadsheet_id')
'python3 listing_benchmark.py [--keep_files] [--upload_gs] [--num_samples NUM_SAMPLES] [--message MESSAGE] --gcsfuse_flags GCSFUSE_FLAGS --command COMMAND config_file --spreadsheet_id')
Tulsishah marked this conversation as resolved.
Show resolved Hide resolved

args = _parse_arguments(argv)

Expand Down
2 changes: 1 addition & 1 deletion perfmetrics/scripts/ls_metrics/run_ls_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ echo Running script..
GCSFUSE_FLAGS=$1
UPLOAD_FLAGS=$2
SPREADSHEET_ID=$3
python3 listing_benchmark.py config.json --gcsfuse_flags "$GCSFUSE_FLAGS" $UPLOAD_FLAGS --command "ls -R" --num_samples 30 --message "Testing CT setup." $SPREADSHEET_ID
python3 listing_benchmark.py config.json --gcsfuse_flags "$GCSFUSE_FLAGS" $UPLOAD_FLAGS --command "ls -R" --num_samples 30 --message "Testing CT setup." --spreadsheet_id=$SPREADSHEET_ID
2 changes: 1 addition & 1 deletion perfmetrics/scripts/run_load_test_and_fetch_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ echo Installing requirements..
pip install --require-hashes -r requirements.txt --user
gsutil cp gs://periodic-perf-tests/creds.json gsheet
echo Fetching results..
python3 fetch_and_upload_metrics.py "fio-output${EXPERIMENT_NUMBER}.json" $UPLOAD_FLAGS $SPREADSHEET_ID
python3 fetch_and_upload_metrics.py "fio-output${EXPERIMENT_NUMBER}.json" $UPLOAD_FLAGS --spreadsheet_id=$SPREADSHEET_ID
Loading