Skip to content

Commit feb4045

Browse files
authored
Merge pull request #16 from redhat-performance/documenation
Add documentation and make sure runs without options.
2 parents 73bea77 + 67560cf commit feb4045

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Automation wrapper for pyper
2+
3+
Description:
4+
From website: The pyperformance project is intended to be an authoritative source of benchmarks
5+
for all Python implementations. The focus is on real-world benchmarks, rather than synthetic
6+
benchmarks, using whole applications when possible.
7+
8+
Location of underlying workload: https://github.com/python/pyperformance
9+
10+
Packages required: numactl,perf
11+
12+
To run:
13+
```
14+
[root@hawkeye ~]# git clone https://github.com/redhat-performance/pyperf-wrapper
15+
[root@hawkeye ~]# pyperf-wrapper/pyperf/pyperf_run
16+
```
17+
18+
The script will set the buffer sizes based on the hardware it is being executed on.
19+
20+
```
21+
Options
22+
General options
23+
--home_parent <value>: Our parent home directory. If not set, defaults to current working directory.
24+
--host_config <value>: default is the current host name.
25+
--iterations <value>: Number of times to run the test, defaults to 1.
26+
--pbench: use pbench-user-benchmark and place information into pbench, defaults to do not use.
27+
--pbench_user <value>: user who started everything. Defaults to the current user.
28+
--pbench_copy: Copy the pbench data, not move it.
29+
--pbench_stats: What stats to gather. Defaults to all stats.
30+
--run_label: the label to associate with the pbench run. No default setting.
31+
--run_user: user that is actually running the test on the test system. Defaults to user running wrapper.
32+
--sys_type: Type of system working with, aws, azure, hostname. Defaults to hostname.
33+
--sysname: name of the system running, used in determining config files. Defaults to hostname.
34+
--tuned_setting: used in naming the tar file, default for RHEL is the current active tuned. For non
35+
RHEL systems, default is none.
36+
--usage: this usage message.
37+
```
38+
39+
Note: The script does not install pbench for you. You need to do that manually.

pyperf/pyperf_run

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

3-
python_pkg="python36"
3+
PATH="${PATH}:/usr/local/bin"
4+
export PATH
5+
python_pkg="python3.11"
46
#
57
# To make sure.
68
#
@@ -141,6 +143,7 @@ test_name_run="pyperf"
141143
arguments="$@"
142144

143145
curdir=`pwd`
146+
144147
if [[ $0 == "./"* ]]; then
145148
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
146149
if [[ $chars == 1 ]]; then
@@ -149,9 +152,15 @@ if [[ $0 == "./"* ]]; then
149152
run_dir=`echo $0 | cut -d'/' -f 1-${chars} | cut -d'.' -f2-`
150153
run_dir="${curdir}${run_dir}"
151154
fi
155+
elif [[ $0 != "/"* ]]; then
156+
dir=`echo $0 | rev | cut -d'/' -f2- | rev`
157+
run_dir="${curdir}/${dir}"
152158
else
153159
chars=`echo $0 | awk -v RS='/' 'END{print NR-1}'`
154160
run_dir=`echo $0 | cut -d'/' -f 1-${chars}`
161+
if [[ $run_dir != "/"* ]]; then
162+
run_dir=${curdir}/${run_dir}
163+
fi
155164
fi
156165

157166
if [ ! -f "/tmp/pyperf.out" ]; then

0 commit comments

Comments
 (0)