Skip to content

Commit

Permalink
Make the spreadsheetId argument optional (#2012)
Browse files Browse the repository at this point in the history
* fix spreadsheet compulson issue

* fix spreadsheet compulson issue

* testing

* testing

* testing

* testing

* testing

* review comments
  • Loading branch information
Tulsishah committed Jun 13, 2024
1 parent 6add684 commit ad99e17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion perfmetrics/scripts/fetch_and_upload_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def _parse_arguments(argv):
)

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

return parser.parse_args(argv[1:])
Expand Down
5 changes: 3 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,10 @@ def _parse_arguments(argv):
)

parser.add_argument(
'spreadsheet_id',
'--spreadsheet_id',
help='Provide id of spreadsheet',
action='store',
required=False,
)
# Ignoring the first parameter, as it is the path of this python
# script itself.
Expand Down Expand Up @@ -568,7 +569,7 @@ def _export_to_bigquery(test_type, config_id, start_time_build, ls_data):
if len(argv) < 4:
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 SPREADSHEETID')

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

0 comments on commit ad99e17

Please sign in to comment.