From: halil.cakal Date: Wed, 24 Apr 2024 09:02:55 +0000 (+0100) Subject: Add header to performance test categories X-Git-Url: https://gerrit.nordix.org/gitweb?p=infra%2Fcicd.git;a=commitdiff_plain;h=869f794ed20f36ded005d2028e519213735b8e1e Add header to performance test categories - set timer to every odd hour for plot job - add more performance graph to ncmp category - add new categories: unstable tests for cps and ncmp - move the explanatory text to the bottom of the pageA - publish the html reports on different tabs Issue-ID: CPS-2162 Change-Id: I289297297eec273f54f095adc0556cf2f394352c Signed-off-by: halil.cakal --- diff --git a/jjb/onap/cps/cps-performance-test-jobs.yaml b/jjb/onap/cps/cps-performance-test-jobs.yaml index 01647e0c8..06d76a707 100644 --- a/jjb/onap/cps/cps-performance-test-jobs.yaml +++ b/jjb/onap/cps/cps-performance-test-jobs.yaml @@ -39,7 +39,7 @@ name: cps-tests-plots project: cps project-name: cps - timer: "15 4 * * *" + timer: "0 1-23/2 * * *" jobs: - - 'onap-{project-name}-performance-tests-plots' \ No newline at end of file + - 'onap-{project-name}-performance-tests-plots' diff --git a/jjb/onap/cps/prepare-performance-tests-data.sh b/jjb/onap/cps/prepare-performance-tests-data.sh index 47739442a..3ccb5ed98 100755 --- a/jjb/onap/cps/prepare-performance-tests-data.sh +++ b/jjb/onap/cps/prepare-performance-tests-data.sh @@ -24,9 +24,13 @@ set -o pipefail # Use last non-zero exit code in a pipeline ################################################ F U N C T I O N S ########################################################## ############################################################################################################################# -cps_test_names=("Delete data nodes for anchor" "Delete one large node" "Batch delete 100 lists elements" "Batch delete 100 containers" "Query across anchors top element" "Delete root node" "Query across anchors ancestors" "Query across anchors leaf condition + an" "Read datatrees using openroadm root" "Read datatrees using openroadm top eleme" "Query 1 anchor leaf condition + ancestor" "Query 1 anchor top element" "Creating 33,000 books" "Replace list of 0 with 100" "Query ancestors with all descendants" "Replace 0 nodes with 100" "Writing 6400 books" "Read datatrees with all descendants" "Query 1 anchor ancestors" "Writing 400 devices" "Writing 3200 books" "Saving list of 100 devices" "Saving list of 50 devices" "Saving list of 400 devices" "Query with all descendants" "Writing 100 devices" "Writing 50 devices" "Writing 200 devices" "Read datatrees for multiple xpaths" "Saving list of 200 devices") +cps_stable_test_names=("Delete data nodes for anchor" "Delete one large node" "Batch delete 100 lists elements" "Batch delete 100 containers" "Query across anchors top element" "Delete root node" "Query across anchors ancestors" "Query across anchors leaf condition + an" "Read datatrees using openroadm root" "Read datatrees using openroadm top eleme" "Query 1 anchor leaf condition + ancestor" "Query 1 anchor top element" "Creating 33,000 books" "Replace list of 0 with 100" "Query ancestors with all descendants" "Replace 0 nodes with 100" "Writing 6400 books" "Read datatrees with all descendants" "Query 1 anchor ancestors" "Writing 400 devices" "Writing 3200 books" "Saving list of 100 devices" "Saving list of 50 devices" "Saving list of 400 devices" "Query with all descendants" "Writing 100 devices" "Writing 50 devices" "Writing 200 devices" "Read datatrees for multiple xpaths" "Saving list of 200 devices") -ncmp_test_name_names=("Look up CM-handles by module-set-tag") +ncmp_stable_test_names=("Look up CM-handles by module-set-tag" "CpsPath Registry attributes Query") + +cps_unstable_test_names=("Batch delete 100 non-existing" "Batch delete 100 whole lists" "Query with direct descendants" "Delete 100 whole lists" "Query 1 anchor non-existing data" "Read datatrees with no descendants" "Read non-existing xpaths" "Query with no descendants" "Update leaves for 100 data nodes" "Query ancestors with no descendants" "Replace 100 with new leaf values" "Query ancestors with direct descendants" "Replace list of 100 with new leaf values" "Replace list of 100 using same data" "Deleting test data" "Replace list of 100 nodes with 1" "Read datatrees using openroadm whole lis" "Replace 100 using same data" "Read datatrees with direct descendants" "Replace 100 nodes with 0" "Replace list with 50 existing and 50 new" "Delete 100 lists elements" "Replace 50 existing and 50 new" "Writing 800 books" "Delete 100 containers" "Replace list with 100 new nodes" "Replace 100 with 100 new nodes" "Writing 1600 books" "Saving list of 200 devices" "Read datatrees for multiple xpaths") + +ncmp_unstable_test_names=("Look up CM-handle by id" "Update matching subscription" "Look up CM-handle by alternate-id") JENKINS_JOB_URL="https://jenkins.nordix.org/job/onap-cps-master-performance-test-java" @@ -54,7 +58,7 @@ getLastRecordedBuildNumber() { local left_side=$(echo "$last_line" | cut -d ',' -f 1) echo "$left_side" else - echo "File '$file_name' not found in the current directory" + echo "0" fi } @@ -75,11 +79,17 @@ getAndRecordPerformanceJobResultForBuild() { buildNumber="$1" getConsoleText "$buildNumber" # Loop through each text name - for cps_test_name in "${cps_test_names[@]}"; do - getAndRecordDataResults "$consoleText" "$cps_test_name" "$cps_test_name.txt" "$buildNumber" + for cps_stable_test_name in "${cps_stable_test_names[@]}"; do + getAndRecordDataResults "$consoleText" "$cps_stable_test_name" "$cps_stable_test_name.txt" "$buildNumber" + done + for ncmp_stable_test_name in "${ncmp_stable_test_names[@]}"; do + getAndRecordDataResults "$consoleText" "$ncmp_stable_test_name" "$ncmp_stable_test_name.txt" "$buildNumber" done - for ncmp_test_name in "${ncmp_test_name_names[@]}"; do - getAndRecordDataResults "$consoleText" "$ncmp_test_name" "$ncmp_test_name.txt" "$buildNumber" + for cps_unstable_test_name in "${cps_unstable_test_names[@]}"; do + getAndRecordDataResults "$consoleText" "$cps_unstable_test_name" "$cps_unstable_test_name.txt" "$buildNumber" + done + for ncmp_unstable_test_name in "${ncmp_unstable_test_names[@]}"; do + getAndRecordDataResults "$consoleText" "$ncmp_unstable_test_name" "$ncmp_unstable_test_name.txt" "$buildNumber" done } @@ -153,59 +163,10 @@ EOT rm gnuplot_script.gp } -# Builds index.html file (main page) -buildMainPageHtmlReport() { -cat <"index.html" - - - - Performance Review - - -

Performance Review

-

Last updated for performance job build no. $latestRecordedBuild on $formattedTimestampOfLatestRecordedBuild

-

The performance tests job runs every two hours, providing performance metrics. The following graphs update at 04:15 UTC.

-

Successful performance tests job build adds new data, but even if a build fails, existing data is retained.

-

Updates occur whenever new successful data is available.

- - -EOT - -# Loop through the test names and chart file names to generate HTML rows for CPS -for cps_test_name in "${cps_test_names[@]}"; do - cat <>index.html - - - -EOF -done - -# Loop through the test names and chart file names to generate HTML rows for NCMP -for ncmp_test_name in "${ncmp_test_name_names[@]}"; do - cat <>index.html - - - -EOF -done - -# Close the HTML file -cat <>index.html -
-
"$cps_test_name (CPS)"
- -
-
"$ncmp_test_name (NCMP)"
- -
- - -EOT -} - -# Builds sub-HTML pages -buildSubPageHtmlReport() { - chartFileName="$1" +# Builds category html file +buildCategoryHtmlReport() { + # use indirect expansion to get all elements of the array + categoryName=("${!1}") reportTitle="$2" outputFile="$3" cat <"$outputFile" @@ -215,11 +176,29 @@ buildSubPageHtmlReport() { $reportTitle -

$reportTitle

-

Last updated for performance job build no. $latestRecordedBuild on $formattedTimestampOfLatestRecordedBuild

- Graph Image +

$reportTitle

+

Last updated for performance job build no. $latestRecordedBuild on $formattedTimestampOfLatestRecordedBuild

+ +EOT +# Loop through the test names to generate HTML rows +for test_name_in_category in "${categoryName[@]}"; do + cat <>"$outputFile" + + + +EOF +done +# Close the HTML file +cat <>"$outputFile" +
+
"$test_name_in_category"
+ +
+

The performance tests job runs every two (even) hours, providing performance metrics. The following graphs being updated every two (odd) hours.

+

Successful performance tests job build adds new data, but even if a build fails, existing data is retained.

+

Updates occur whenever new successful data is available.

- + EOT } @@ -252,20 +231,21 @@ else fi # Plot image (graphs) files in png format -for cps_test_name in "${cps_test_names[@]}"; do - buildPlotImage "$cps_test_name.txt" "$cps_test_name.png" +for cps_stable_test_name in "${cps_stable_test_names[@]}"; do + buildPlotImage "$cps_stable_test_name.txt" "$cps_stable_test_name.png" done -for ncmp_test_name in "${ncmp_test_name_names[@]}"; do - buildPlotImage "$ncmp_test_name.txt" "$ncmp_test_name.png" +for ncmp_stable_test_name in "${ncmp_stable_test_names[@]}"; do + buildPlotImage "$ncmp_stable_test_name.txt" "$ncmp_stable_test_name.png" done - -# Build the summary(index.html) page -buildMainPageHtmlReport - -# Build individual html page reports for each test -for cps_test_name in "${cps_test_names[@]}"; do - buildSubPageHtmlReport "$cps_test_name.png" "$cps_test_name" "$cps_test_name.html" +for cps_unstable_test_name in "${cps_unstable_test_names[@]}"; do + buildPlotImage "$cps_unstable_test_name.txt" "$cps_unstable_test_name.png" done -for ncmp_test_name in "${ncmp_test_name_names[@]}"; do - buildSubPageHtmlReport "$ncmp_test_name.png" "$ncmp_test_name" "$ncmp_test_name.html" +for ncmp_unstable_test_name in "${ncmp_unstable_test_names[@]}"; do + buildPlotImage "$ncmp_unstable_test_name.txt" "$ncmp_unstable_test_name.png" done + +# Build the category pages +buildCategoryHtmlReport cps_stable_test_names[@] "cps stable tests performance review" "cpsStableTestsPerformanceReview.html" +buildCategoryHtmlReport ncmp_stable_test_names[@] "ncmp stable tests performance review" "ncmpStableTestsPerformanceReview.html" +buildCategoryHtmlReport cps_unstable_test_names[@] "cps unstable tests performance review" "cpsUnstableTestsPerformanceReview.html" +buildCategoryHtmlReport ncmp_unstable_test_names[@] "ncmp unstable tests performance review" "ncmpUnstableTestsPerformanceReview.html" diff --git a/jjb/onap/global-templates-onap-java.yaml b/jjb/onap/global-templates-onap-java.yaml index 00b8b281a..63d1ba923 100644 --- a/jjb/onap/global-templates-onap-java.yaml +++ b/jjb/onap/global-templates-onap-java.yaml @@ -162,7 +162,7 @@ - html-publisher: name: "Performance Review" dir: "." - files: "index.html,createOperation.html,readOperation.html,updateOperation.html,deleteOperation.html" + files: "cpsStableTestsPerformanceReview.html,ncmpStableTestsPerformanceReview.html,cpsUnstableTestsPerformanceReview.html,ncmpUnstableTestsPerformanceReview.html" - job-template: name: 'onap-{project-name}-{stream}-performance-test-java'