From: ToineSiebelink Date: Thu, 22 May 2025 11:58:13 +0000 (+0100) Subject: Make Groovy Performance Test Stable X-Git-Tag: 3.6.3~7 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=a992c6300f12d83602a4b78b0090123f5d50fee3;p=cps.git Make Groovy Performance Test Stable - Increased threshold on some graphs to prevent failure when running parallel with endurance Issue-ID: CPS-2743 Change-Id: Ic96dd1a29ca3046668b18195399be37786fb965a Signed-off-by: ToineSiebelink --- diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy index d93ea4b309..be9252ad3e 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeletePerfTest.groovy @@ -122,16 +122,14 @@ class DeletePerfTest extends CpsPerfTestBase { def 'Batch delete 100 whole lists'() { given: 'a list of xpaths to delete' - def xpathsToDelete = (1..100).collect { - "/openroadm-devices/openroadm-device[@device-id='C201-7-1A-" + it + "']/org-openroadm-device/degree" - } + def xpathsToDelete = (1..100).collect { "/openroadm-devices/openroadm-device[@device-id='C201-7-1A-" + it + "']/org-openroadm-device/degree" } when: 'lists are deleted' resourceMeter.start() objectUnderTest.deleteDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, 'delete6', xpathsToDelete, OffsetDateTime.now()) resourceMeter.stop() def deleteDurationInSeconds = resourceMeter.getTotalTimeInSeconds() then: 'delete duration is below accepted margin (3x) of the expected average' - recordAndAssertResourceUsage('Batch delete 100 whole lists', 3.4, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB(), 3) + recordAndAssertResourceUsage('Batch delete 100 whole lists', 3.8, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB(), 4) } def 'Delete 1 large data node'() { @@ -175,7 +173,7 @@ class DeletePerfTest extends CpsPerfTestBase { resourceMeter.stop() def deleteDurationInSeconds = resourceMeter.getTotalTimeInSeconds() then: 'delete duration is below accepted margin of the expected average' - recordAndAssertResourceUsage('Batch delete 100 non-existing', 2, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB()) + recordAndAssertResourceUsage('Batch delete 100 non-existing', 2, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB(),3) } def 'Clean up test data'() { diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/GetPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/GetPerfTest.groovy index e42792e653..aa92b3940e 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/GetPerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/GetPerfTest.groovy @@ -60,7 +60,7 @@ class GetPerfTest extends CpsPerfTestBase { then: 'requested nodes and their descendants are returned' assert countDataNodesInTree(result) == OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE and: 'all data is read within expected time and a margin of 200%' - recordAndAssertResourceUsage("Read datatrees for multiple xpaths", 1.1, durationInSeconds, 300, resourceMeter.getTotalMemoryUsageInMB(),3) + recordAndAssertResourceUsage("Read datatrees for multiple xpaths", 1.3, durationInSeconds, 300, resourceMeter.getTotalMemoryUsageInMB(),3) } def 'Read for multiple xpaths to non-existing datanodes'() { diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy index 2b104992dc..8c378356f6 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy @@ -79,7 +79,7 @@ class QueryPerfTest extends CpsPerfTestBase { then: 'the expected number of nodes is returned' assert countDataNodesInTree(result) == expectedNumberOfDataNodes and: 'all data is read #expectedDuration seconds with a margin of 50%' - recordAndAssertResourceUsage("Query with ${scenario}", expectedDuration, durationInSeconds, memoryLimit, resourceMeter.getTotalMemoryUsageInMB()) + recordAndAssertResourceUsage("Query with ${scenario}", expectedDuration, durationInSeconds, memoryLimit, resourceMeter.getTotalMemoryUsageInMB(),2) where: 'the following parameters are used' scenario | fetchDescendantsOption || expectedDuration | memoryLimit | expectedNumberOfDataNodes 'no descendants' | OMIT_DESCENDANTS || 0.08 | 6 | OPENROADM_DEVICES_PER_ANCHOR diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryPerfTest.groovy index c0dec8b53e..5f04519998 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryPerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmHandleQueryPerfTest.groovy @@ -80,7 +80,7 @@ class CmHandleQueryPerfTest extends NcmpPerfTestBase { then: '100 data node have been found' assert count == 100 and: 'average performance is as expected' - recordAndAssertResourceUsage('Look up CM-handle by id', 0.5, resourceMeter.totalTimeInSeconds, 15, resourceMeter.totalMemoryUsageInMB) + recordAndAssertResourceUsage('Look up CM-handle by id', 0.25, resourceMeter.totalTimeInSeconds, 15, resourceMeter.totalMemoryUsageInMB) } def 'CM-handle is looked up by alternate id.'() {