Skip to content

Commit

Permalink
Merge pull request #86 from schrht/devel
Browse files Browse the repository at this point in the history
Support selecting the platform specific config.
  • Loading branch information
schrht authored Aug 5, 2021
2 parents bace19f + 85c3b67 commit b5bc32c
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
2 changes: 1 addition & 1 deletion data_process/templates/generate_testrun_results-fio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ testrun_results_generator:
factor: 0.000001
round: 3
- name: Path
source: auto
source: auto
1 change: 1 addition & 0 deletions jupyter/templates/introduction_kvm_fio.md
1 change: 1 addition & 0 deletions jupyter/templates/introduction_kvm_uperf.md
1 change: 1 addition & 0 deletions jupyter/templates/introduction_qemu_fio.md
1 change: 1 addition & 0 deletions jupyter/templates/introduction_qemu_uperf.md
16 changes: 11 additions & 5 deletions utils/compare_testruns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,24 @@ else
testrun_type=$testtype
fi

# Get ProjectName
project_name=$(echo $testid | cut -d _ -f 2 | tr "[:upper:]" "[:lower:]")
# Get platform
platform=$(echo $testid | cut -d_ -f2 | tr [:upper:] [:lower:])

# Set environment
workspace=$(get_newpath $basepath/reports)
compareid=$(basename $workspace)
mkdir -p $workspace || exit 1

# Collect config and data
gtr_yaml=$templates/generate_testrun_results-${testrun_type}.yaml
g2b_yaml=$templates/generate_2way_benchmark-${testrun_type}.yaml
g2m_yaml=$templates/generate_2way_metadata-${testrun_type}.yaml
gtr_yaml=$templates/generate_testrun_results-${testrun_type}-${platform}.yaml
[ ! -f $gtr_yaml ] && gtr_yaml=$templates/generate_testrun_results-${testrun_type}.yaml
echo "DEBUG: Use config file $gtr_yaml"
g2b_yaml=$templates/generate_2way_benchmark-${testrun_type}-${platform}.yaml
[ ! -f $g2b_yaml ] && g2b_yaml=$templates/generate_2way_benchmark-${testrun_type}.yaml
echo "DEBUG: Use config file $g2b_yaml"
g2m_yaml=$templates/generate_2way_metadata-${testrun_type}-${platform}.yaml
[ ! -f $g2m_yaml ] && g2m_yaml=$templates/generate_2way_metadata-${testrun_type}.yaml
echo "DEBUG: Use config file $g2m_yaml"

if [ -f $gtr_yaml ]; then
cp $gtr_yaml $workspace/base.generate_testrun_results.yaml
Expand Down
10 changes: 7 additions & 3 deletions utils/process_testrun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ if [ ! -e $basepath/testruns/$testrun ]; then
exit 1
fi

# Get TestRunType
# Get TestRunType and Platform
testrun_type=${testrun%%_*}
platform=$(echo $testrun | cut -d_ -f2 | tr [:upper:] [:lower:])

# Set environment
cd $basepath/testruns/$testrun
Expand Down Expand Up @@ -119,8 +120,12 @@ if [ "$update_db" = "1" ]; then
[ "$testrun_type" = "fio" ] && flag="--storage"
[ "$testrun_type" = "uperf" ] && flag="--network"

cfg_file=$templates/generate_testrun_results-${testrun_type}-dbloader-${platform}.yaml
[ ! -f $cfg_file ] && cfg_file=$templates/generate_testrun_results-${testrun_type}-dbloader.yaml
echo "DEBUG: Use config file $cfg_file"

generate_testrun_results.py \
--config $templates/generate_testrun_results-${testrun_type}-dbloader.yaml \
--config $cfg_file \
--output $csv_file &&
cp $db $db.writebackup_$(date +%Y%m%d_%H%M%S) &&
flask_load_db.py --db_file $db --delete $testrun $flag &&
Expand All @@ -131,4 +136,3 @@ fi
wait

exit 0

0 comments on commit b5bc32c

Please sign in to comment.