diff options
author | danielhanrahan <daniel.hanrahan@est.tech> | 2023-02-26 14:27:06 +0000 |
---|---|---|
committer | danielhanrahan <daniel.hanrahan@est.tech> | 2023-02-28 16:29:20 +0000 |
commit | 373cdf2e88201f4262bdb3c933a0f84a4160bf72 (patch) | |
tree | f92fefdd04367bf58a03d969ef1123e768494dfb /cps-ri/src/test | |
parent | d7aa2fa43e3ffef8ed03c0a8688135cbd0c19f71 (diff) |
Skip deleting list xpaths that are list elements
List elements cannot be lists. Filtering list elements before trying
to delete lists by xpaths doubles performance when deleting list
elements (which doubles performance of CM handle de-registration).
Issue-ID: CPS-1511
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: Ieb6002212d006396d468f27f853708b5aa1e31f2
Diffstat (limited to 'cps-ri/src/test')
-rw-r--r-- | cps-ri/src/test/groovy/org/onap/cps/spi/performance/CpsDataPersistenceServiceDeletePerfTest.groovy | 7 |
1 files changed, 2 insertions, 5 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 8e74b62228..a08d8c66d2 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 @@ -24,15 +24,12 @@ import org.onap.cps.spi.CpsDataPersistenceService import org.onap.cps.spi.impl.CpsPersistencePerfSpecBase import org.springframework.beans.factory.annotation.Autowired import org.springframework.test.context.jdbc.Sql -import org.springframework.util.StopWatch class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase { @Autowired CpsDataPersistenceService objectUnderTest - def stopWatch = new StopWatch() - @Sql([CLEAR_DATA, PERF_TEST_DATA]) def 'Create a node with many descendants (please note, subsequent tests depend on this running first).'() { when: 'a node with a large number of descendants is created' @@ -165,8 +162,8 @@ class CpsDataPersistenceServiceDeletePerfTest extends CpsPersistencePerfSpecBase objectUnderTest.deleteDataNodes(PERF_DATASPACE, PERF_ANCHOR, xpathsToDelete) stopWatch.stop() def deleteDurationInMillis = stopWatch.getTotalTimeMillis() - then: 'delete duration is under 125 milliseconds' - recordAndAssertPerformance('Batch delete 500 lists elements', 125, deleteDurationInMillis) + then: 'delete duration is under 60 milliseconds' + recordAndAssertPerformance('Batch delete 500 lists elements', 60, deleteDurationInMillis) } @Sql([CLEAR_DATA, PERF_TEST_DATA]) |