Skip to content

Commit 69d573c

Browse files
committed
Feat: Add python version to the header of the CSV
1 parent 6b505cc commit 69d573c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pyperf/pyperf_run

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ PATH="${PATH}:/usr/local/bin"
1919
export PATH
2020
python_pkgs=""
2121
python_exec=""
22+
PYTHON_VERSION=""
2223
PYPERF_VERSION="1.11.0"
2324
#
2425
# To make sure.
@@ -94,7 +95,7 @@ generate_csv_file()
9495
res_count=0
9596
value_sum=0
9697

97-
$TOOLS_BIN/test_header_info --front_matter --results_file "${1}.csv" --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $PYPERF_VERSION --test_name $test_name_run
98+
$TOOLS_BIN/test_header_info --front_matter --results_file "${1}.csv" --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version "py${PYTHON_VERSION}_$PYPERF_VERSION" --test_name $test_name_run
9899

99100
echo "Test:Avg:Unit" >> "${1}.csv"
100101
while IFS= read -r line
@@ -271,7 +272,7 @@ done
271272

272273
if [ $to_pbench -eq 0 ]; then
273274
rm -rf pyperformance
274-
275+
PYTHON_VERSION=$(python3 --version | awk '{ print $2 }')
275276
python3 -m pip install pyperformance==$PYPERF_VERSION
276277
if [ $? -ne 0 ]; then
277278
exit_out "python3 -m pip install pyperformance==$PYPERF_VERSION: failed" 1

0 commit comments

Comments
 (0)