diff options
author | 2023-02-20 15:16:06 +0000 | |
---|---|---|
committer | 2023-02-20 16:19:55 +0000 | |
commit | 946ecf59fbf96de93ceba5937bca059a21d931a2 (patch) | |
tree | 40b795fa9c9e81d339d20665b5228b17251587fb /cps-ri/src/test/groovy | |
parent | 99223ca17f8e9e257d1ac470df8d3f7de72491be (diff) |
Update performance test timings
- Tighten delete perf test timings
- Fix timings for getDataNodes
Issue-ID: CPS-1502
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ib89a70ef90b1b30e2720e48ebfb66650a2fafa12
Diffstat (limited to 'cps-ri/src/test/groovy')
2 files changed, 23 insertions, 23 deletions
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy index 706b35ebb..db09382ab 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy @@ -53,8 +53,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase } stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 350 milliseconds' - recordAndAssertPerformance('Delete 5 children', 350, deleteDurationInMillis) + then: 'delete duration is under 300 milliseconds' + recordAndAssertPerformance('Delete 5 children', 300, deleteDurationInMillis) } def 'Batch delete 100 children with grandchildren'() { @@ -67,8 +67,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, PERF_ANCHOR, xpathsToDelete) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 350 milliseconds' - recordAndAssertPerformance('Batch delete 100 children', 350, deleteDurationInMillis) + then: 'delete duration is under 300 milliseconds' + recordAndAssertPerformance('Batch delete 100 children', 300, deleteDurationInMillis) } def 'Delete 50 grandchildren (that have no descendants)'() { @@ -80,8 +80,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase } stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 350 milliseconds' - recordAndAssertPerformance('Delete 50 grandchildren', 350, deleteDurationInMillis) + then: 'delete duration is under 300 milliseconds' + recordAndAssertPerformance('Delete 50 grandchildren', 300, deleteDurationInMillis) } def 'Batch delete 500 grandchildren (that have no descendants)'() { @@ -97,8 +97,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, PERF_ANCHOR, xpathsToDelete) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 350 milliseconds' - recordAndAssertPerformance('Batch delete 500 grandchildren', 350, deleteDurationInMillis) + then: 'delete duration is under 300 milliseconds' + recordAndAssertPerformance('Batch delete 500 grandchildren', 300, deleteDurationInMillis) } @Sql([CLEAR_DATA, PERF_TEST_DATA]) @@ -121,8 +121,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase } stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 1500 milliseconds' - recordAndAssertPerformance('Delete 5 whole lists', 1500, deleteDurationInMillis) + then: 'delete duration is under 1300 milliseconds' + recordAndAssertPerformance('Delete 5 whole lists', 1300, deleteDurationInMillis) } def 'Batch delete 100 whole lists'() { @@ -148,8 +148,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase } stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 750 milliseconds' - recordAndAssertPerformance('Delete 10 lists elements', 750, deleteDurationInMillis) + then: 'delete duration is under 600 milliseconds' + recordAndAssertPerformance('Delete 10 lists elements', 600, deleteDurationInMillis) } def 'Batch delete 500 list elements'() { @@ -165,8 +165,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, PERF_ANCHOR, xpathsToDelete) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 350 milliseconds' - recordAndAssertPerformance('Batch delete 500 lists elements', 350, deleteDurationInMillis) + then: 'delete duration is under 300 milliseconds' + recordAndAssertPerformance('Batch delete 500 lists elements', 300, deleteDurationInMillis) } @Sql([CLEAR_DATA, PERF_TEST_DATA]) @@ -193,8 +193,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, PERF_ANCHOR, [PERF_TEST_PARENT]) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 300 milliseconds' - recordAndAssertPerformance('Batch delete one large node', 300, deleteDurationInMillis) + then: 'delete duration is under 250 milliseconds' + recordAndAssertPerformance('Batch delete one large node', 250, deleteDurationInMillis) } @Sql([CLEAR_DATA, PERF_TEST_DATA]) @@ -235,8 +235,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, [PERF_ANCHOR]) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 300 milliseconds' - recordAndAssertPerformance('Delete data nodes for anchor', 300, deleteDurationInMillis) + then: 'delete duration is under 250 milliseconds' + recordAndAssertPerformance('Delete data nodes for anchors', 250, deleteDurationInMillis) } } diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServicePerfTest.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServicePerfTest.groovy index 246fd80bb..a2ec29aec 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServicePerfTest.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServicePerfTest.groovy @@ -67,14 +67,14 @@ class CpsDataPersistenceServicePerfTest extends CpsPersistencePerfSpecBase { def result = objectUnderTest.getDataNodes(PERF_DATASPACE, PERF_ANCHOR, xpath, INCLUDE_ALL_DESCENDANTS) stopWatch.stop() def readDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'read duration is under 500 milliseconds' - recordAndAssertPerformance("Get ${scenario}", 500, readDurationInMillis) + then: 'read duration is under #allowedDuration milliseconds' + recordAndAssertPerformance("Get ${scenario}", allowedDuration, readDurationInMillis) and: 'data node is returned with all the descendants populated' assert countDataNodes(result[0]) == TOTAL_NUMBER_OF_NODES where: 'the following xPaths are used' - scenario || xpath - 'parent' || PERF_TEST_PARENT - 'root' || '' + scenario | xpath || allowedDuration + 'parent' | PERF_TEST_PARENT || 3500 + 'root' | '' || 500 } def 'Query parent data node with many descendants by cps-path'() { |