Adjust CPS Performance test margins 83/143183/5 master
authorArpit Singh6 <AS00745003@techmahindra.com>
Mon, 2 Mar 2026 13:48:15 +0000 (19:18 +0530)
committerToine Siebelink <toine.siebelink@est.tech>
Mon, 9 Mar 2026 11:08:33 +0000 (11:08 +0000)
As per discussion in the CPS weekly meeting dated Feb 11, 2026 the performance margin for following tests is to be adjusted:

 - Graph #51 Read datatrees using openroadm whole
 - Graph #52 Read datatree with all descendants
 - Graph #53 Read datatree with direct descendant
 - Graph #71 Saving list of 400 devices
 - Graph #81 Creating modified openroadm anchor
 - Graph #82 Clean up for CPS Delta
 - Graph #83 Delta test setup

Issue-ID: CPS-3173
Change-Id: If691691c8356dae9344a6947cf0c98f66e35c0a4
Signed-off-by: Arpit Singh6 <AS00745003@techmahindra.com>
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/DeltaPerfTest.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/GetPerfTest.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/WritePerfTest.groovy

index 2092221..dd5b04a 100644 (file)
@@ -46,7 +46,7 @@ class DeltaPerfTest extends CpsPerfTestBase{
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'setup duration is below accepted margin of the expected average'
-            recordAndAssertResourceUsage('CPS: Delta test setup', 20, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB(), false)
+            recordAndAssertResourceUsage('CPS: Delta test setup', 10, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB(), false)
     }
     
     def 'Setup target anchor (please note, subsequent tests depend on this running first).'() {
@@ -57,7 +57,7 @@ class DeltaPerfTest extends CpsPerfTestBase{
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'the anchor is created within expected time'
-            recordAndAssertResourceUsage('CPS: Creating modified openroadm anchor', 25, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB(), false)
+            recordAndAssertResourceUsage('CPS: Creating modified openroadm anchor', 33, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB(), false)
     }
 
     def 'Get delta between 2 anchors with grouping enabled and #scenario'() {
@@ -69,12 +69,12 @@ class DeltaPerfTest extends CpsPerfTestBase{
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'the delta is returned and operation completes within expected time'
-            recordAndAssertResourceUsage('CPS:Delta between 2 anchors', expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage("CPS:Delta b/w 2 anchors ${scenario}", expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
         where: 'the following parameters are used'
             scenario             | xpath                                                             | fetchDescendantsOption  || expectedDuration
             'no descendants'     | '/openroadm-devices/openroadm-device[@device-id=\'C201-7-1A-1\']' | OMIT_DESCENDANTS        || 2.0
             'direct descendants' | '/'                                                               | DIRECT_CHILDREN_ONLY    || 3.0
-            'all descendants'    | '/'                                                               | INCLUDE_ALL_DESCENDANTS || 23.0
+            'all descendants'    | '/'                                                               | INCLUDE_ALL_DESCENDANTS || 38.0
     }
 
     def 'Get delta between 2 anchors with grouping disabled and #scenario'() {
@@ -86,12 +86,12 @@ class DeltaPerfTest extends CpsPerfTestBase{
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'the delta is returned and operation completes within expected time'
-            recordAndAssertResourceUsage('CPS:Delta between 2 anchors, without grouping', expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage("CPS:Delta b/w 2 anchors, w/o grouping ${scenario}", expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
         where: 'the following parameters are used'
             scenario             | xpath                                                             | fetchDescendantsOption  || expectedDuration
             'no descendants'     | '/openroadm-devices/openroadm-device[@device-id=\'C201-7-1A-1\']' | OMIT_DESCENDANTS        || 1.0
             'direct descendants' | '/openroadm-devices'                                              | DIRECT_CHILDREN_ONLY    || 2.0
-            'all descendants'    | '/openroadm-devices'                                              | INCLUDE_ALL_DESCENDANTS || 25.0
+            'all descendants'    | '/openroadm-devices'                                              | INCLUDE_ALL_DESCENDANTS || 45.0
     }
 
     def 'Get delta between an anchor and JSON payload with grouping enabled and #scenario'() {
@@ -101,7 +101,7 @@ class DeltaPerfTest extends CpsPerfTestBase{
             resourceMeter.stop()
             def durationInSeconds = resourceMeter.getTotalTimeInSeconds()
         then: 'the delta is returned and operation completes within expected time'
-            recordAndAssertResourceUsage('CPS:Delta between anchor and JSON, with grouping', expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage("CPS:Delta b/w anchor & JSON, w/ grouping ${scenario}", expectedDuration, durationInSeconds, resourceMeter.getTotalMemoryUsageInMB())
         where: 'the following parameters are used'
             scenario             | fetchDescendantsOption  || expectedDuration
             'no descendants'     | OMIT_DESCENDANTS        || 4.0
index 59b461b..47526de 100644 (file)
@@ -1,6 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
+ *  Modifications Copyright (C) 2026 Deutsche Telekom AG
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -45,8 +46,8 @@ class GetPerfTest extends CpsPerfTestBase {
         where: 'the following parameters are used'
             scenario             | fetchDescendantsOption  | referencegraph || expectedDuration | expectedNumberOfDataNodes
             'no descendants'     | OMIT_DESCENDANTS        | false          || 0.01             | 1
-            'direct descendants' | DIRECT_CHILDREN_ONLY    | false          || 0.045            | 1 + OPENROADM_DEVICES_PER_ANCHOR
-            'all descendants'    | INCLUDE_ALL_DESCENDANTS | true           || 1.1              | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
+            'direct descendants' | DIRECT_CHILDREN_ONLY    | false          || 0.0            | 1 + OPENROADM_DEVICES_PER_ANCHOR
+            'all descendants'    | INCLUDE_ALL_DESCENDANTS | true           || 1.0              | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
     }
 
     def 'Read data trees for multiple xpaths'() {
@@ -90,7 +91,7 @@ class GetPerfTest extends CpsPerfTestBase {
             scenario                | xpath                                  || expectedDuration | expectedNumberOfDataNodes
             'openroadm root'        | '/'                                    || 1                | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
             'openroadm top element' | '/openroadm-devices'                   || 0.95             | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
-            'openroadm whole list'  | '/openroadm-devices/openroadm-device'  || 1.06             | OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
+            'openroadm whole list'  | '/openroadm-devices/openroadm-device'  || 3.00             | OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
     }
 
 }
index 5d4dee2..d2f6e62 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  ============LICENSE_START=======================================================
  *  Copyright (C) 2023-2025 OpenInfra Foundation Europe. All rights reserved.
- *  Modifications Copyright (C) 2024 Deutsche Telekom AG
+ *  Modifications Copyright (C) 2024-2026 Deutsche Telekom AG
  *  ================================================================================
  *  Licensed under the Apache License, Version 2.0 (the 'License');
  *  you may not use this file except in compliance with the License.
@@ -97,7 +97,7 @@ class WritePerfTest extends CpsPerfTestBase {
             50         || 1.5
             100        || 3.0
             200        || 6.4
-            400        || 14.0
+            400        || 10.0
     }
 
 }