Skip to content

Commit 2d966eb

Browse files
authored
Merge pull request #36 from redhat-performance/pcp
Replace Pbench with PCP
2 parents d452b41 + cbe14ff commit 2d966eb

File tree

1 file changed

+51
-29
lines changed

1 file changed

+51
-29
lines changed

passmark/passmark_run

Lines changed: 51 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
test_name="passmark"
2525
passmark_version="v1.0"
2626
curdir=`pwd`
27+
copy_dirs=""
28+
2729
if [ ! -f "/tmp/${test_name}.out" ]; then
2830
command="${0} $@"
2931
echo $command
@@ -69,6 +71,12 @@ $curdir/test_tools/gather_data ${curdir}
6971

7072
exit_out()
7173
{
74+
if [[ $to_use_pcp -eq 1 ]]; then
75+
stop_pcp_subset
76+
stop_pcp
77+
shutdown_pcp
78+
fi
79+
7280
echo $1
7381
exit $2
7482
}
@@ -247,33 +255,51 @@ run_passmark()
247255
# Iteration of test.
248256
#
249257

250-
if [ $to_pbench -eq 0 ]; then
251-
rm ${test_name}_*out
252-
rm passmark.summary
253-
for iter in $(seq 1 1 $to_times_to_run); do
254-
if [[ $arch == "aarch64" ]]; then
255-
./pt_linux_arm64 -r 3 >> ${test_name}_${iter}.out
256-
if [ $? -ne 0 ]; then
257-
exit_out "Execution of ./pt_linux_arm64 failed" 1
258-
fi
259-
else
260-
./pt_linux_x64 -r 3 >> ${test_name}_${iter}.out
261-
if [ $? -ne 0 ]; then
262-
exit_out "Execution of ./pt_linux_x64 failed" 1
263-
fi
258+
rm ${test_name}_*out
259+
rm passmark.summary
260+
261+
if [[ $to_use_pcp -eq 1 ]]; then
262+
source $TOOLS_BIN/pcp/pcp_commands.inc
263+
setup_pcp
264+
pcp_cfg=$TOOLS_BIN/pcp/default.cfg
265+
pcp_dir=/tmp/pcp_passmark_$(date +%Y.%m.%d-%H.%M.%S)
266+
start_pcp $pcp_dir passmark $pcp_cfg
267+
copy_dirs="$pcp_dir"
268+
fi
269+
270+
for iter in $(seq 1 1 $to_times_to_run); do
271+
if [[ $to_use_pcp -eq 1 ]];then
272+
start_pcp_subset
273+
fi
274+
if [[ $arch == "aarch64" ]]; then
275+
./pt_linux_arm64 -r 3 >> ${test_name}_${iter}.out
276+
if [ $? -ne 0 ]; then
277+
exit_out "Execution of ./pt_linux_arm64 failed" 1
264278
fi
265-
mv results_all.yml results_all_${iter}.yml
266-
done
267-
produce_report
268-
${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --results results.csv --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user --other_files "passmark.summary,results_all_*,${test_name}_${iter}.out,test_results_report"
269-
cp results_${test_name}_${to_tuned_setting}.tar results_pbench_${test_name}_${to_tuned_setting}.tar
270-
popd > /dev/null
271-
else
272-
source ~/.bashrc
273-
cd $curdir
274-
echo $TOOLS_BIN/execute_via_pbench --cmd_executing "$0" $arguments --test ${test_name} --spacing 11 --pbench_stats $to_pstats
275-
$TOOLS_BIN/execute_via_pbench --cmd_executing "$0" $arguments --test ${test_name} --spacing 11 --pbench_stats $to_pstats
279+
else
280+
./pt_linux_x64 -r 3 >> ${test_name}_${iter}.out
281+
if [ $? -ne 0 ]; then
282+
exit_out "Execution of ./pt_linux_x64 failed" 1
283+
fi
284+
fi
285+
mv results_all.yml results_all_${iter}.yml
286+
if [[ $to_use_pcp -eq 1 ]]; then
287+
result2pcp iteration $iter
288+
stop_pcp_subset
289+
fi
290+
done
291+
292+
produce_report
293+
if [[ $to_use_pcp -eq 1 ]]; then
294+
stop_pcp
295+
fi
296+
297+
if [[ -n "$copy_dirs" ]]; then
298+
copy_dirs="--copy_dir $copy_dirs"
276299
fi
300+
301+
${curdir}/test_tools/save_results --curdir $curdir --home_root $to_home_root --results results.csv --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user --other_files "passmark.summary,results_all_*,${test_name}_${iter}.out,test_results_report" $copy_dirs
302+
popd > /dev/null
277303
}
278304

279305
install_tools "$@"
@@ -285,10 +311,6 @@ install_tools "$@"
285311
# to_home_root: home directory
286312
# to_configuration: configuration information
287313
# to_times_to_run: number of times to run the test
288-
# to_pbench: Run the test via pbench
289-
# to_pbench_copy: Copy the data to the pbench repository, not move_it.
290-
# to_puser: User running pbench
291-
# to_run_label: Label for the run
292314
# to_user: User on the test system running the test
293315
# to_sys_type: for results info, basically aws, azure or local
294316
# to_sysname: name of the system

0 commit comments

Comments
 (0)