summaryrefslogtreecommitdiffstats
path: root/integration-test/src/test
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-06-21 13:53:32 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2023-06-21 14:48:36 +0100
commit8d08b0eebb1e6f002c29bc88a70c2a60e26d56ed (patch)
tree485b9111fbbf9c11d77a0083f267a095576a9f7a /integration-test/src/test
parent765de151f09345e96fac3e3254071718289b8359 (diff)
Improve performance of updateDataLeaves
Avoid fetching descendants during batchUpdateDataLeaves, as descendants are not needed: - Remove prefetch descendants step from getFragmentEntities; - Explicitly prefetch descendants in operations requiring it; - Update performance tests (5x faster for batch update). Issue-ID: CPS-1675 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7442a6f799cc0803b3a78f09d1ee53377f24b0b7
Diffstat (limited to 'integration-test/src/test')
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy8
1 files changed, 4 insertions, 4 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy
index b3c8841270..6d856cc881 100644
--- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy
+++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/UpdatePerfTest.groovy
@@ -70,8 +70,8 @@ class UpdatePerfTest extends CpsPerfTestBase {
objectUnderTest.updateNodeLeaves(CPS_PERFORMANCE_TEST_DATASPACE, 'openroadm3', "/openroadm-devices", jsonDataOriginal, now)
stopWatch.stop()
def updateDurationInMillis = stopWatch.getTotalTimeMillis()
- then: 'update duration is under 750 milliseconds'
- recordAndAssertPerformance('Update leaves for 1 data node', 750, updateDurationInMillis)
+ then: 'update duration is under 650 milliseconds'
+ recordAndAssertPerformance('Update leaves for 1 data node', 650, updateDurationInMillis)
}
def 'Batch update leaves for 50 data nodes'() {
@@ -84,8 +84,8 @@ class UpdatePerfTest extends CpsPerfTestBase {
objectUnderTest.updateNodeLeaves(CPS_PERFORMANCE_TEST_DATASPACE, 'openroadm4', "/openroadm-devices", jsonDataOriginal, now)
stopWatch.stop()
def updateDurationInMillis = stopWatch.getTotalTimeMillis()
- then: 'update duration is under 3500 milliseconds'
- recordAndAssertPerformance('Batch update leaves for 50 data nodes', 3500, updateDurationInMillis)
+ then: 'update duration is under 700 milliseconds'
+ recordAndAssertPerformance('Batch update leaves for 50 data nodes', 700, updateDurationInMillis)
}
}