Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions specjbb/results_schema.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pydantic
import datetime
class Specjbb_Results(pydantic.BaseModel):
Warehouses: int = pydantic.Field(gt=0)
Bops: int = pydantic.Field(gt=0)
Numb_JVMs: int = pydantic.Field(gt=0)
Start_Date: datetime.datetime
End_Date: datetime.datetime
15 changes: 11 additions & 4 deletions specjbb/specjbb_run
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#
# Defined options
#
script_dir=$(realpath $(dirname $0))
act_jvms=0
java_version=21
RESULTSDIR_TOP=""
Expand All @@ -49,6 +50,7 @@ test_status="Ran"
start_warehouse=0
increment_warehouse=0
pdir=""
save_csv_file=""

tools_git=https://github.com/redhat-performance/test_tools-wrappers

Expand Down Expand Up @@ -212,6 +214,7 @@ process_specjbb_data()
for lvl2 in `ls -d $lvl1/results_specjbb*`; do
pushd $lvl2 > /tmp/null
csv_file=`pwd`/results_${test_name}.csv
save_csv_file=$csv_file
if [ ! -f $csv_file ]; then
$TOOLS_BIN/test_header_info --front_matter --results_file $csv_file --host $to_configuration --sys_type $to_sys_type --tuned $to_tuned_setting --results_version $version --test_name $test_name --field_header "Warehouses,Bops,Numb_JVMs"
fi
Expand Down Expand Up @@ -535,7 +538,7 @@ usage()
echo " --start-warehouses: Number of warehouses to start at, default 2, if cpus < 16 else value is calculated."
echo " --stop-warehouse: Warehouses top stop at. Default is ncpus."
echo " --usage: this is usage message."
source test_tools/general_setup --usage
source ${TOOLS_BIN}/general_setup --usage
}


Expand Down Expand Up @@ -564,8 +567,10 @@ done
# Check to see if the test tools directory exists. If it does, we do not need to
# clone the repo.
#
if [ ! -d "test_tools" ]; then
git clone $tools_git test_tools
TOOLS_BIN=${HOME}/test_tools
export TOOLS_BIN
if [ ! -d "${TOOLS_BIN}" ]; then
git clone $tools_git ${TOOLS_BIN}
if [ $? -ne 0 ]; then
error_out "pulling git $tools_git failed." 1
fi
Expand All @@ -575,7 +580,7 @@ if [ $show_usage -eq 1 ]; then
usage $0
fi

source test_tools/general_setup "$@"
source ${TOOLS_BIN}/general_setup "$@"
# Gather hardware information
${TOOLS_BIN}/gather_data ${curdir}

Expand Down Expand Up @@ -820,6 +825,8 @@ if [[ $to_use_pcp -eq 1 ]]; then
cp -R $pdir /tmp/${RESULTSDIR_TOP}
fi
if [[ $rtc -eq 0 ]]; then
${TOOLS_BIN}/csv_to_json $to_json_flags --csv_file $save_csv_file --output_file results_specjbb.json
$TOOLS_BIN/verify_results $to_verify_flags --schema_file $script_dir/results_schema.py --class_name Specjbb_Results --file results_specjbb.json
${TOOLS_BIN}/save_results --curdir $curdir --home_root $to_home_root --copy_dir /tmp/${RESULTSDIR_TOP} --test_name $test_name --tuned_setting=$to_tuned_setting --version NONE --user $to_user
fi
exit $rtc