diff options
-rw-r--r-- | checkstyle/pom.xml | 2 | ||||
-rwxr-xr-x | cps-application/pom.xml | 2 | ||||
-rw-r--r-- | cps-bom/pom.xml | 2 | ||||
-rwxr-xr-x | cps-dependencies/pom.xml | 2 | ||||
-rw-r--r-- | cps-events/pom.xml | 2 | ||||
-rw-r--r-- | cps-ncmp-events/pom.xml | 2 | ||||
-rw-r--r-- | cps-ncmp-rest-stub/pom.xml | 2 | ||||
-rw-r--r-- | cps-ncmp-rest/pom.xml | 2 | ||||
-rw-r--r-- | cps-ncmp-service/pom.xml | 2 | ||||
-rwxr-xr-x | cps-parent/pom.xml | 2 | ||||
-rw-r--r-- | cps-path-parser/pom.xml | 2 | ||||
-rwxr-xr-x | cps-rest/pom.xml | 2 | ||||
-rw-r--r-- | cps-ri/pom.xml | 2 | ||||
-rw-r--r-- | cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsToDataNodePerfSpec.groovy | 89 | ||||
-rw-r--r-- | cps-service/pom.xml | 2 | ||||
-rw-r--r-- | jacoco-report/pom.xml | 2 | ||||
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | spotbugs/pom.xml | 2 | ||||
-rwxr-xr-x | version.properties | 4 |
19 files changed, 108 insertions, 19 deletions
diff --git a/checkstyle/pom.xml b/checkstyle/pom.xml index 9a3896899c..dd308e295a 100644 --- a/checkstyle/pom.xml +++ b/checkstyle/pom.xml @@ -26,7 +26,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.onap.cps</groupId> <artifactId>checkstyle</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <profiles> <profile> diff --git a/cps-application/pom.xml b/cps-application/pom.xml index 20bfb0dc4d..a4d3cbd438 100755 --- a/cps-application/pom.xml +++ b/cps-application/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-bom/pom.xml b/cps-bom/pom.xml index e80e6b4872..004c31e39d 100644 --- a/cps-bom/pom.xml +++ b/cps-bom/pom.xml @@ -25,7 +25,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.onap.cps</groupId> <artifactId>cps-bom</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <packaging>pom</packaging> <description>This artifact contains dependencyManagement declarations of all published CPS components.</description> diff --git a/cps-dependencies/pom.xml b/cps-dependencies/pom.xml index a3d42ddbd6..e04ff02775 100755 --- a/cps-dependencies/pom.xml +++ b/cps-dependencies/pom.xml @@ -27,7 +27,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.onap.cps</groupId> <artifactId>cps-dependencies</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <packaging>pom</packaging> <name>${project.groupId}:${project.artifactId}</name> diff --git a/cps-events/pom.xml b/cps-events/pom.xml index 39f8e49765..6cbb7ebe72 100644 --- a/cps-events/pom.xml +++ b/cps-events/pom.xml @@ -24,7 +24,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-ncmp-events/pom.xml b/cps-ncmp-events/pom.xml index 4658894858..193f5d02ad 100644 --- a/cps-ncmp-events/pom.xml +++ b/cps-ncmp-events/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-ncmp-rest-stub/pom.xml b/cps-ncmp-rest-stub/pom.xml index 2a4979a331..a1711b5f4d 100644 --- a/cps-ncmp-rest-stub/pom.xml +++ b/cps-ncmp-rest-stub/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-ncmp-rest/pom.xml b/cps-ncmp-rest/pom.xml index a4c44ba769..8473674be6 100644 --- a/cps-ncmp-rest/pom.xml +++ b/cps-ncmp-rest/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-ncmp-service/pom.xml b/cps-ncmp-service/pom.xml index 6a9d9485c4..0f5a234be0 100644 --- a/cps-ncmp-service/pom.xml +++ b/cps-ncmp-service/pom.xml @@ -27,7 +27,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml index 8739e2ce3e..a29d624aea 100755 --- a/cps-parent/pom.xml +++ b/cps-parent/pom.xml @@ -32,7 +32,7 @@ <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <packaging>pom</packaging> <properties> diff --git a/cps-path-parser/pom.xml b/cps-path-parser/pom.xml index ffac3b02a1..dce9ace708 100644 --- a/cps-path-parser/pom.xml +++ b/cps-path-parser/pom.xml @@ -23,7 +23,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-rest/pom.xml b/cps-rest/pom.xml index 37b3e46247..f42aaaa3b7 100755 --- a/cps-rest/pom.xml +++ b/cps-rest/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/cps-ri/pom.xml b/cps-ri/pom.xml index 5cdbf90c48..824a8d9710 100644 --- a/cps-ri/pom.xml +++ b/cps-ri/pom.xml @@ -26,7 +26,7 @@ <parent>
<groupId>org.onap.cps</groupId>
<artifactId>cps-parent</artifactId>
- <version>3.1.5-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<relativePath>../cps-parent/pom.xml</relativePath>
</parent>
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsToDataNodePerfSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsToDataNodePerfSpec.groovy new file mode 100644 index 0000000000..c36de9aaa1 --- /dev/null +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsToDataNodePerfSpec.groovy @@ -0,0 +1,89 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2022 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.ri.performance + +import org.apache.commons.lang3.time.StopWatch +import org.onap.cps.spi.CpsDataPersistenceService +import org.onap.cps.spi.impl.CpsPersistenceSpecBase +import org.onap.cps.spi.model.DataNode +import org.onap.cps.spi.model.DataNodeBuilder +import org.springframework.beans.factory.annotation.Autowired +import org.springframework.test.context.jdbc.Sql +import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS + +class CpsToDataNodePerfSpec extends CpsPersistenceSpecBase { + + @Autowired + CpsDataPersistenceService objectUnderTest + + static final String SET_DATA = '/data/fragment.sql' + static final String XPATH_DATA_NODE_WITH_DESCENDANTS = '/parent-1' + + @Sql([CLEAR_DATA, SET_DATA]) + def 'Get data node by xpath with all descendants with many children'() { + given: 'nodes and grandchildren have been persisted' + def setupStopWatch = new StopWatch() + setupStopWatch.start() + createLineage() + setupStopWatch.stop() + def setupDurationInMillis = setupStopWatch.getTime() + when: 'data node is requested with all descendants' + def readStopWatch = new StopWatch() + readStopWatch.start() + def result = objectUnderTest.getDataNode( + DATASPACE_NAME, ANCHOR_NAME1, XPATH_DATA_NODE_WITH_DESCENDANTS, INCLUDE_ALL_DESCENDANTS) + readStopWatch.stop() + def readDurationInMillis = readStopWatch.getTime() + then : 'setup duration is under 8 seconds' + assert setupDurationInMillis < 8000 + and: 'read duration is under 3.5 seconds' + assert readDurationInMillis < 3500 + and: 'data node is returned with all the descendants populated' + assert countDataNodes(result) == 1533 + } + + def createLineage() { + def numOfChildren = 30 + def numOfGrandChildren = 50 + (1..numOfChildren).each { + def childName = "perf-test-child-${it}".toString() + def newChild = goForthAndMultiply(XPATH_DATA_NODE_WITH_DESCENDANTS, childName, numOfGrandChildren) + objectUnderTest.addChildDataNode(DATASPACE_NAME, ANCHOR_NAME1, XPATH_DATA_NODE_WITH_DESCENDANTS, newChild) + } + } + + def goForthAndMultiply(parentXpath, childName, numOfGrandChildren) { + def children = [] + (1..numOfGrandChildren).each { + def child = new DataNodeBuilder().withXpath("${parentXpath}/${childName}/${it}-grand-child").build() + children.add(child) + } + return new DataNodeBuilder().withXpath("${parentXpath}/${childName}").withChildDataNodes(children).build() + } + + def countDataNodes(DataNode dataNode) { + int nodeCount = 1 + for (DataNode child : dataNode.childDataNodes) { + nodeCount = nodeCount + (countDataNodes(child)) + } + return nodeCount + } +}
\ No newline at end of file diff --git a/cps-service/pom.xml b/cps-service/pom.xml index 51cf32475c..f47a963154 100644 --- a/cps-service/pom.xml +++ b/cps-service/pom.xml @@ -28,7 +28,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> diff --git a/jacoco-report/pom.xml b/jacoco-report/pom.xml index a78399872c..3e7af63321 100644 --- a/jacoco-report/pom.xml +++ b/jacoco-report/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId>org.onap.cps</groupId> <artifactId>cps-parent</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <relativePath>../cps-parent/pom.xml</relativePath> </parent> <modelVersion>4.0.0</modelVersion> @@ -32,7 +32,7 @@ <groupId>org.onap.cps</groupId>
<artifactId>cps-aggregator</artifactId>
- <version>3.1.5-SNAPSHOT</version>
+ <version>3.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>cps</name>
diff --git a/spotbugs/pom.xml b/spotbugs/pom.xml index c04f89f3e9..306bdff392 100644 --- a/spotbugs/pom.xml +++ b/spotbugs/pom.xml @@ -25,7 +25,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>org.onap.cps</groupId> <artifactId>spotbugs</artifactId> - <version>3.1.5-SNAPSHOT</version> + <version>3.2.0-SNAPSHOT</version> <properties> <nexusproxy>https://nexus.onap.org</nexusproxy> diff --git a/version.properties b/version.properties index 00839db8e5..0a0cb6c5d7 100755 --- a/version.properties +++ b/version.properties @@ -21,8 +21,8 @@ # because they are used in Jenkins, whose plug-in doesn't support this major=3 -minor=1 -patch=5 +minor=2 +patch=0 base_version=${major}.${minor}.${patch} |