X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftools%2Freport_gen%2Frun_report.sh;h=ece60368da9cc1d0de4769401073bbef8f49ae81;hp=c24034f4836ca0806eb3bb38b8286d052cdeaccb;hb=4457640600a2b875da17e97dba2dcab8a411eb95;hpb=785519e26196b9e0a5016d0fc54ed099fd0a920f diff --git a/resources/tools/report_gen/run_report.sh b/resources/tools/report_gen/run_report.sh index c24034f483..ece60368da 100755 --- a/resources/tools/report_gen/run_report.sh +++ b/resources/tools/report_gen/run_report.sh @@ -3,7 +3,7 @@ set -x # Build locally without jenkins integrations -DEBUG=1 +DEBUG=0 # Build directories WORKING_DIR='_tmp' @@ -21,17 +21,19 @@ PLOT_VPP_SOURCE_DIR=${WORKING_DIR}/vpp_plot PLOT_DPDK_SOURCE_DIR=${WORKING_DIR}/dpdk_plot DTR_SOURCE_DIR=${SOURCE_DIR}/detailed_test_results -DTR_PERF_SOURCE_DIR=${DTR_SOURCE_DIR}/vpp_performance_results DTR_DPDK_SOURCE_DIR=${DTR_SOURCE_DIR}/dpdk_performance_results -DTR_FUNC_SOURCE_DIR=${DTR_SOURCE_DIR}/vpp_functional_results -DTR_HONEYCOMB_SOURCE_DIR=${DTR_SOURCE_DIR}/honeycomb_functional_results +DTR_VPP_PERF_SOURCE_DIR=${DTR_SOURCE_DIR}/vpp_performance_results +DTR_VPP_FUNC_SOURCE_DIR=${DTR_SOURCE_DIR}/vpp_functional_results +DTR_HC_PERF_SOURCE_DIR=${DTR_SOURCE_DIR}/honeycomb_performance_results +DTR_HC_FUNC_SOURCE_DIR=${DTR_SOURCE_DIR}/honeycomb_functional_results +DTR_NSHSFC_FUNC_SOURCE_DIR=${DTR_SOURCE_DIR}/nshsfc_functional_results DTC_SOURCE_DIR=${SOURCE_DIR}/test_configuration -DTC_PERF_SOURCE_DIR=${DTC_SOURCE_DIR}/vpp_performance_configuration -DTC_FUNC_SOURCE_DIR=${DTC_SOURCE_DIR}/vpp_functional_configuration +DTC_VPP_PERF_SOURCE_DIR=${DTC_SOURCE_DIR}/vpp_performance_configuration +DTC_VPP_FUNC_SOURCE_DIR=${DTC_SOURCE_DIR}/vpp_functional_configuration DTO_SOURCE_DIR=${SOURCE_DIR}/test_operational_data -DTO_PERF_SOURCE_OPER_DIR=${DTO_SOURCE_DIR}/vpp_performance_operational_data +DTO_VPP_PERF_SOURCE_OPER_DIR=${DTO_SOURCE_DIR}/vpp_performance_operational_data # Jenkins links CSIT_JEN_URL='https://jenkins.fd.io/view/csit/job' @@ -41,18 +43,18 @@ sudo apt-get -y update sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \ zlib1g-dev unzip -# Clean-up when finished: +# Clean-up when finished trap 'rm -rf ${WORKING_DIR}; exit' EXIT trap 'rm -rf ${WORKING_DIR}; exit' ERR -# Remove the old build: +# Remove the old build rm -rf ${BUILD_DIR} || true rm -rf ${WORKING_DIR} || true # Create working directories mkdir ${BUILD_DIR} -# Create virtual environment: +# Create virtual environment virtualenv ${WORKING_DIR}/env . ${WORKING_DIR}/env/bin/activate @@ -72,73 +74,78 @@ mkdir -p ${PLOT_DPDK_SOURCE_DIR} ### VPP PERFORMANCE SOURCE DATA JEN_FILE_PERF='output_perf_data.xml' -JEN_JOB='csit-vpp-perf-1704-all' -JEN_BUILD=(6 7 8 9 10 12 14 15 16 17) +JEN_JOB='csit-vpp-perf-master-all' +JEN_BUILD=(1567) +JEN_FBUILD=1567 for i in "${JEN_BUILD[@]}"; do curl --fail -fs ${CSIT_JEN_URL}/${JEN_JOB}/${i}/robot/report/output_perf_data.xml \ -o ${PLOT_VPP_SOURCE_DIR}/${JEN_JOB}-${i}.xml if [[ ${DEBUG} -eq 1 ]] ; then - cp ./${JEN_JOB}-10.zip ${STATIC_DIR_ARCH}/${JEN_JOB}-10.zip + cp ./${JEN_JOB}-${JEN_FBUILD}.zip ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_FBUILD}.zip else curl --fail -fs ${CSIT_JEN_URL}/${JEN_JOB}/${i}/robot/report/\*zip\*/robot-plugin.zip \ -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${i}.zip fi done -unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-10.zip -d ${WORKING_DIR}/ +unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_FBUILD}.zip -d ${WORKING_DIR}/ python run_robot_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - --output ${DTR_PERF_SOURCE_DIR}/vpp_performance_results.rst \ + --output ${DTR_VPP_PERF_SOURCE_DIR}/vpp_performance_results.rst \ --formatting rst --start 4 --level 2 python run_robot_teardown_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - --output ${DTC_PERF_SOURCE_DIR}/vpp_performance_configuration.rst \ + --output ${DTC_VPP_PERF_SOURCE_DIR}/vpp_performance_configuration.rst \ --data "VAT_H" -f "rst" --start 4 --level 2 python run_robot_teardown_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - -o ${DTO_PERF_SOURCE_OPER_DIR}/vpp_performance_operational_data.rst \ + -o ${DTO_VPP_PERF_SOURCE_OPER_DIR}/vpp_performance_operational_data.rst \ --data "SH_RUN" -f "rst" --start 4 --level 2 -sed -i -e "s@###JOB###@${JEN_JOB}\/75@g" \ - ${DTR_PERF_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/75@g" \ - ${DTR_PERF_SOURCE_DIR}/index.rst -sed -i -e "s@###JOB###@${JEN_JOB}\/75@g" \ - ${DTC_PERF_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/75@g" \ - ${DTC_PERF_SOURCE_DIR}/index.rst -sed -i -e "s@###JOB###@${JEN_JOB}\/75@g" \ - ${DTO_PERF_SOURCE_OPER_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/75@g" \ - ${DTO_PERF_SOURCE_OPER_DIR}/index.rst +if [[ ${DEBUG} -eq 0 ]] ; +then + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTR_VPP_PERF_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTR_VPP_PERF_SOURCE_DIR}/index.rst + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTC_VPP_PERF_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTC_VPP_PERF_SOURCE_DIR}/index.rst + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTO_VPP_PERF_SOURCE_OPER_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_FBUILD}@g" \ + ${DTO_VPP_PERF_SOURCE_OPER_DIR}/index.rst +fi ### DPDK PERFORMANCE SOURCE DATA -JEN_JOB='csit-dpdk-perf-master-all' -JEN_BUILD=(13 14 15 16) +JEN_JOB='csit-dpdk-perf-1707-all' +JEN_BUILD=(1 2 3 4 5 6 7 8 9 10) for i in "${JEN_BUILD[@]}"; do curl --fail -fs ${CSIT_JEN_URL}/${JEN_JOB}/${i}/robot/report/output_perf_data.xml \ -o ${PLOT_DPDK_SOURCE_DIR}/${JEN_JOB}-${i}.xml if [[ ${DEBUG} -eq 1 ]] ; then - cp ./${JEN_JOB}-16.zip ${STATIC_DIR_ARCH}/${JEN_JOB}-16.zip + cp ./${JEN_JOB}-${JEN_BUILD[-1]}.zip ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD[-1]}.zip else curl --fail -fs ${CSIT_JEN_URL}/${JEN_JOB}/${i}/robot/report/\*zip\*/robot-plugin.zip \ -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${i}.zip + + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD[-1]}@g" \ + ${DTR_DPDK_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD[-1]}@g" \ + ${DTR_DPDK_SOURCE_DIR}/index.rst fi done -unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-16.zip -d ${WORKING_DIR}/ +unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD[-1]}.zip -d ${WORKING_DIR}/ python run_robot_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ --output ${DTR_DPDK_SOURCE_DIR}/dpdk_performance_results.rst \ - --formatting rst --start 3 --level 2 -sed -i -e "s@###JOB###@${JEN_JOB}\/16@g" \ - ${DTR_DPDK_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/16@g" \ - ${DTR_DPDK_SOURCE_DIR}/index.rst + --formatting rst --start 4 --level 2 ### FUNCTIONAL SOURCE DATA -JEN_JOB='csit-vpp-functional-master-ubuntu1604-virl' +JEN_JOB='csit-vpp-functional-1707-ubuntu1604-virl' JEN_BUILD='lastSuccessfulBuild' if [[ ${DEBUG} -eq 1 ]] ; @@ -147,27 +154,28 @@ then else curl -fs ${CSIT_JEN_URL}/${JEN_JOB}/${JEN_BUILD}/robot/report/\*zip\*/robot-plugin.zip \ -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip + + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_VPP_FUNC_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_VPP_FUNC_SOURCE_DIR}/index.rst + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTC_VPP_FUNC_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTC_VPP_FUNC_SOURCE_DIR}/index.rst fi unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip -d ${WORKING_DIR}/ python run_robot_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - --output ${DTR_FUNC_SOURCE_DIR}/vpp_functional_results.rst \ + --output ${DTR_VPP_FUNC_SOURCE_DIR}/vpp_functional_results.rst \ --formatting rst --start 5 --level 2 python run_robot_teardown_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - --output ${DTC_FUNC_SOURCE_DIR}/vpp_functional_configuration.rst \ + --output ${DTC_VPP_FUNC_SOURCE_DIR}/vpp_functional_configuration.rst \ --data "VAT_H" -f "rst" --start 5 --level 2 -sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTR_FUNC_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTR_FUNC_SOURCE_DIR}/index.rst -sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTC_FUNC_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${CSIT_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTC_FUNC_SOURCE_DIR}/index.rst ### HONEYCOMB SOURCE DATA -JEN_JOB='hc2vpp-csit-integration-master-ubuntu1604' +JEN_JOB='hc2vpp-csit-integration-1707-ubuntu1604' JEN_BUILD='lastSuccessfulBuild' if [[ ${DEBUG} -eq 1 ]] ; @@ -176,21 +184,47 @@ then else curl -fs ${HC_JEN_URL}/${JEN_JOB}/${JEN_BUILD}/robot/report/\*zip\*/robot-plugin.zip \ -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip + + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_HC_FUNC_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${HC_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_HC_FUNC_SOURCE_DIR}/index.rst fi unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip -d ${WORKING_DIR}/ python run_robot_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ - --output ${DTR_HONEYCOMB_SOURCE_DIR}/honeycomb_functional_results.rst \ - --formatting rst --start 3 --level 2 -sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTR_HONEYCOMB_SOURCE_DIR}/index.rst -sed -i -e "s@###LINK###@${HC_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ - ${DTR_HONEYCOMB_SOURCE_DIR}/index.rst + --output ${DTR_HC_FUNC_SOURCE_DIR}/honeycomb_functional_results.rst \ + --formatting rst --start 5 --level 2 + +### NSH_SFC SOURCE DATA + +JEN_JOB='csit-nsh_sfc-verify-func-1707-ubuntu1604-virl' +JEN_BUILD='lastSuccessfulBuild' + +if [[ ${DEBUG} -eq 1 ]] ; +then + cp ./${JEN_JOB}-${JEN_BUILD}.zip ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip +else + curl -fs ${CSIT_JEN_URL}/${JEN_JOB}/${JEN_BUILD}/robot/report/\*zip\*/robot-plugin.zip \ + -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip + + sed -i -e "s@###JOB###@${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_NSHSFC_FUNC_SOURCE_DIR}/index.rst + sed -i -e "s@###LINK###@${HC_JEN_URL}\/${JEN_JOB}\/${JEN_BUILD}@g" \ + ${DTR_NSHSFC_FUNC_SOURCE_DIR}/index.rst +fi + +unzip -o ${STATIC_DIR_ARCH}/${JEN_JOB}-${JEN_BUILD}.zip -d ${WORKING_DIR}/ +python run_robot_data.py -i ${WORKING_DIR}/robot-plugin/output.xml \ + --output ${DTR_NSHSFC_FUNC_SOURCE_DIR}/nshsfc_functional_results.rst \ + --formatting rst --start 5 --level 2 + + # Delete temporary json files find ${SOURCE_DIR} -name "*.json" -type f -delete -# Generate the documentation: +# Generate the documentation DATE=$(date -u '+%d-%b-%Y') @@ -354,11 +388,13 @@ python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ --output ${STATIC_DIR_DPDK}/64B-1t1c-ipv4-ndrdisc \ --title "64B-1t1c-ethip4-ip4base-l3fwd-ndrdisc" \ - --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"NDRDISC") and contains(@tags,"1T1C") and contains(@tags,"IP4FWD")]' + --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"NDRDISC") and contains(@tags,"1T1C") and contains(@tags,"IP4FWD")]' \ + --lower 2000000 --upper 12000000 python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ --output ${STATIC_DIR_DPDK}/64B-2t2c-ipv4-ndrdisc \ --title "64B-2t2c-ethip4-ip4base-l3fwd-ndrdisc" \ - --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"NDRDISC") and contains(@tags,"2T2C") and contains(@tags,"IP4FWD")]' + --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"NDRDISC") and contains(@tags,"2T2C") and contains(@tags,"IP4FWD")]' \ + --lower 2000000 --upper 12000000 python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ --output ${STATIC_DIR_DPDK}/64B-1t1c-l2-pdrdisc \ @@ -371,11 +407,13 @@ python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ --output ${STATIC_DIR_DPDK}/64B-1t1c-ipv4-pdrdisc \ --title "64B-1t1c-ethip4-ip4base-l3fwd-pdrdisc" \ - --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"PDRDISC") and not(contains(@tags,"NDRDISC")) and contains(@tags,"1T1C") and contains(@tags,"IP4FWD")]' + --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"PDRDISC") and not(contains(@tags,"NDRDISC")) and contains(@tags,"1T1C") and contains(@tags,"IP4FWD")]' \ + --lower 20000000 --upper 30000000 python run_plot.py --input ${PLOT_DPDK_SOURCE_DIR} \ --output ${STATIC_DIR_DPDK}/64B-2t2c-ipv4-pdrdisc \ --title "64B-2t2c-ethip4-ip4base-l3fwd-pdrdisc" \ - --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"PDRDISC") and not(contains(@tags,"NDRDISC")) and contains(@tags,"2T2C") and contains(@tags,"IP4FWD")]' + --xpath '//*[@framesize="64B" and contains(@tags,"BASE") and contains(@tags,"PDRDISC") and not(contains(@tags,"NDRDISC")) and contains(@tags,"2T2C") and contains(@tags,"IP4FWD")]' \ + --lower 20000000 --upper 30000000 # Plot latency