X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=integration-test%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fintegration%2Fperformance%2Fncmp%2FCmDataSubscriptionsPerfTest.groovy;h=579394be857d299e01fca23503afc396b594e1ad;hb=0fdda53aa0dde9ec3a4c1b287b3ff8da4a75da5c;hp=b12dbaa3ce65949ba54c9704e693b266fc3f4c5b;hpb=c29a5fe32db7efb0fdefa3a3d020110aab9731b4;p=cps.git diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmDataSubscriptionsPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmDataSubscriptionsPerfTest.groovy index b12dbaa3c..579394be8 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmDataSubscriptionsPerfTest.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/ncmp/CmDataSubscriptionsPerfTest.groovy @@ -51,8 +51,8 @@ class CmDataSubscriptionsPerfTest extends NcmpPerfTestBase { resourceMeter.stop() matches.size() == numberOfFiltersPerCmHandle * numberOfCmHandlesPerCmDataSubscription and: 'query all subscribers within 1 second' - def durationInMillis = resourceMeter.getTotalTimeMillis() - recordAndAssertResourceUsage("Query all subscribers", 1_000, durationInMillis, 400, resourceMeter.getTotalMemoryUsageInMB()) + def durationInSeconds = resourceMeter.getTotalTimeInSeconds() + recordAndAssertResourceUsage("Query all subscribers", 1.2, durationInSeconds, 300, resourceMeter.getTotalMemoryUsageInMB()) } def 'Worst case subscription update (200x10 matching entries).'() { @@ -90,12 +90,12 @@ class CmDataSubscriptionsPerfTest extends NcmpPerfTestBase { } resourceMeter.stop() - def durationInMillis = resourceMeter.getTotalTimeMillis() + def durationInSeconds = resourceMeter.getTotalTimeInSeconds() then: 'a subscriber has been added to each filter entry' def resultAfter = objectUnderTest.queryDataNodes(NCMP_PERFORMANCE_TEST_DATASPACE, CM_DATA_SUBSCRIPTIONS_ANCHOR, cpsPath, INCLUDE_ALL_DESCENDANTS) assert resultAfter.collect {it.leaves.subscribers.size()}.sum() == totalNumberOfEntries * (1 + numberOfCmDataSubscribers) - and: 'update matching subscription within 8 seconds' - recordAndAssertResourceUsage("Update matching subscription", 8_000, durationInMillis, 400, resourceMeter.getTotalMemoryUsageInMB()) + and: 'update matching subscription within 15 seconds' + recordAndAssertResourceUsage("Update matching subscription", 15, durationInSeconds, 1000, resourceMeter.getTotalMemoryUsageInMB()) } def 'Worst case new subscription (200x10 new entries).'() { @@ -107,9 +107,9 @@ class CmDataSubscriptionsPerfTest extends NcmpPerfTestBase { resourceMeter.start() cpsDataService.saveData(NCMP_PERFORMANCE_TEST_DATASPACE, CM_DATA_SUBSCRIPTIONS_ANCHOR, xPathForDataStore1CmHandles, cmHandles, now) resourceMeter.stop() - def durationInMillis = resourceMeter.getTotalTimeMillis() + def durationInSeconds = resourceMeter.getTotalTimeInSeconds() then: 'insert new subscription with 1 second' - recordAndAssertResourceUsage("Insert new subscription", 1_000, durationInMillis, 400,resourceMeter.getTotalMemoryUsageInMB()) + recordAndAssertResourceUsage("Insert new subscription", 2, durationInSeconds, 100, resourceMeter.getTotalMemoryUsageInMB()) } def querySubscriptionsByIteration(Collection allSubscriptionsAsDataNodes, targetSubscriptionSequenceNumber) {