Skip to content

Commit f6c47eb

Browse files
address self-review comments
1 parent 7bf0f4f commit f6c47eb

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

perfmetrics/scripts/testing_on_gke/examples/dlio/run_tests.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,26 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""This program takes in a json dlio test-config file and generates and deploys helm charts."""
18+
"""This program takes in a json test-config file, finds out valid
19+
20+
DLIO workloads from it and generates and deploys a helm chart for
21+
each DLIO workload.
22+
"""
1923

2024
import argparse
2125
import subprocess
2226
import dlio_workload
2327

2428

2529
def run_command(command: str):
30+
"""Runs the given string command as a subprocess."""
2631
result = subprocess.run(command.split(' '), capture_output=True, text=True)
2732
print(result.stdout)
2833
print(result.stderr)
2934

3035

31-
def createHelmInstallCommands(dlioWorkloads):
36+
def createHelmInstallCommands(dlioWorkloads: set):
37+
"""Create helm install commands for the given set of dlioWorkload objects."""
3238
helm_commands = []
3339
for dlioWorkload in dlioWorkloads:
3440
for batchSize in dlioWorkload.batchSizes:
@@ -64,11 +70,16 @@ def main(args) -> None:
6470
parser = argparse.ArgumentParser(
6571
prog='DLIO Unet3d test runner',
6672
description=(
67-
'This program takes in a json dlio test-config file and generates'
68-
' helm install commands to execute them using the active GKE cluster.'
73+
'This program takes in a json test-config file, finds out valid DLIO'
74+
' workloads from it and generates and deploys a helm chart for each'
75+
' DLIO workload.'
6976
),
7077
)
71-
parser.add_argument('--workload-config') # positional argument
78+
parser.add_argument(
79+
'--workload-config',
80+
help='Runs DLIO Unet3d tests using this JSON workload configuration.',
81+
required=True,
82+
)
7283
parser.add_argument(
7384
'-n',
7485
'--dry-run',

perfmetrics/scripts/testing_on_gke/examples/fio/run_tests.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,26 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717

18-
"""This program takes in a json fio test-config file and generates and deploys helm charts."""
18+
"""This program takes in a json test-config file, finds out valid FIO
19+
20+
workloads from it and generates and deploys a helm chart for each FIO
21+
workload.
22+
"""
1923

2024
import argparse
2125
import subprocess
2226
import fio_workload
2327

2428

2529
def run_command(command: str):
30+
"""Runs the given string command as a subprocess."""
2631
result = subprocess.run(command.split(' '), capture_output=True, text=True)
2732
print(result.stdout)
2833
print(result.stderr)
2934

3035

3136
def createHelmInstallCommands(fioWorkloads):
37+
"""Create helm install commands for the given set of fioWorkload objects."""
3238
helm_commands = []
3339
for fioWorkload in fioWorkloads:
3440
for readType in fioWorkload.readTypes:
@@ -66,11 +72,16 @@ def main(args) -> None:
6672
parser = argparse.ArgumentParser(
6773
prog='FIO test runner',
6874
description=(
69-
'This program takes in a json test-config file and generates'
70-
' helm install commands to execute them using the active GKE cluster.'
75+
'This program takes in a json test-config file, finds out valid FIO'
76+
' workloads from it and generates and deploys a helm chart for each'
77+
' FIO workload.'
7178
),
7279
)
73-
parser.add_argument('--workload-config')
80+
parser.add_argument(
81+
'--workload-config',
82+
help='Runs FIO tests using this JSON workload configuration',
83+
required=True,
84+
)
7485
parser.add_argument(
7586
'-n',
7687
'--dry-run',

0 commit comments

Comments
 (0)