File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ install_pip=0
2323PYTHON_VERSION=" "
2424PYPERF_VERSION=" 1.11.0"
2525copy_dirs=" "
26+ benchmarks=" all"
2627
2728base_dir=$( dirname $( realpath $0 ) )
2829#
@@ -46,6 +47,7 @@ usage()
4647 echo " --pyperf_version <version number>: Version of pyperf to run, default is $PYPERF_VERSION ."
4748 echo " --python_exec_path: Python to set via alternatives"
4849 echo " --python_pkgs: comma seprated list of python packages to install"
50+ echo " --pyperf_benchmarks: Comma separated list of pyperformance benchmarks to run. Default is to run all tests."
4951 source test_tools/general_setup --usage
5052 exit 1
5153}
@@ -255,6 +257,7 @@ ARGUMENT_LIST=(
255257 " pyperf_version"
256258 " python_exec"
257259 " python_pkgs"
260+ " pyperf_benchmarks"
258261)
259262
260263NO_ARGUMENTS=(
@@ -291,6 +294,10 @@ while [[ $# -gt 0 ]]; do
291294 install_pip=1
292295 shift 1
293296 ;;
297+ --pyperf_benchmarks)
298+ benchmarks=$2
299+ shift 2
300+ ;;
294301 --usage)
295302 usage $0
296303 ;;
@@ -351,7 +358,12 @@ if [[ $to_use_pcp -eq 1 ]]; then
351358 copy_dirs=" $pcp_dir "
352359fi
353360
354- $python_exec -m pyperformance run --output ${pyresults} .json
361+ pyperf_flags=" "
362+ if [[ " $benchmarks " != " all" ]]; then
363+ pyperf_flags=" -b $benchmarks "
364+ fi
365+
366+ $python_exec -m pyperformance run --output ${pyresults} .json $pyperf_flags
355367if [ $? -ne 0 ]; then
356368 exit_out " Failed: $python_exec -m pyperformance run --output ${pyresults} .json" 1
357369fi
You can’t perform that action at this time.
0 commit comments