API Documentation for Benchmark Scripts
Benchmark Package
- Copyright (C) 2024 Intel Corporation. *
- SPDX-License-Identifier: Apache-2.0
convert_csv_results_to_json(results_dir, log_name)
convert the csv output to json format for readability
Parameters:
Name | Type | Description | Default |
---|---|---|---|
results_dir
|
directory containing the benchmark results |
required | |
log_name
|
first portion of the log filename to search for |
required |
docker_compose_containers(command, compose_files=[], compose_pre_args='', compose_post_args='', env_vars=os.environ.copy())
helper function to bring up or down containers using the provided params
Parameters:
Name | Type | Description | Default |
---|---|---|---|
command
|
valid docker compose command like "up" or "down" |
required | |
compose_files
|
list of docker compose files |
[]
|
|
compose_pre_args
|
string of arguments called before the command |
''
|
|
compose_post_args
|
string of arguments called after the command |
''
|
|
env_vars
|
environment variables to use in the shell for calling compose |
copy()
|
Returns:
Name | Type | Description |
---|---|---|
stdout |
console output from Popen when running the command |
|
stderr |
console error from Popen when running the command |
|
returncode |
Popen return code |
main()
runs benchmarking using docker compose for the specified pipeline
parse_args(print=False)
parses the input arguments for the command line
Parameters:
Name | Type | Description | Default |
---|---|---|---|
print
|
boolean on whether to print the help or not |
False
|
Returns:
Name | Type | Description |
---|---|---|
None |
if print is True |
|
parser_object |
if the input arguments are parsed |