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).'() {
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'() {
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'() {
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'() {
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
/*
* ============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.
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.03 | 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'() {
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
}
}