+ def 'Read top-level node with #scenario.'() {
+ when: 'get data nodes from 1 anchor'
+ stopWatch.start()
+ def result = objectUnderTest.getDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, anchor, '/openroadm-devices', fetchDescendantsOption)
+ stopWatch.stop()
+ assert countDataNodesInTree(result) == expectedNumberOfDataNodes
+ def durationInMillis = stopWatch.getTotalTimeMillis()
+ then: 'all data is read within #durationLimit ms'
+ recordAndAssertPerformance("Read datatrees with ${scenario}", durationLimit, durationInMillis)
+ where: 'the following parameters are used'
+ scenario | fetchDescendantsOption | anchor || durationLimit | expectedNumberOfDataNodes
+ 'no descendants' | OMIT_DESCENDANTS | 'openroadm1' || 100 | 1
+ 'direct descendants' | DIRECT_CHILDREN_ONLY | 'openroadm2' || 100 | 1 + 50
+ 'all descendants' | INCLUDE_ALL_DESCENDANTS | 'openroadm3' || 350 | 1 + 50 * 86
+ }
+
+ def 'Read data trees for multiple xpaths'() {
+ given: 'a collection of xpaths to get'
+ def xpaths = (1..50).collect { "/openroadm-devices/openroadm-device[@device-id='C201-7-1A-" + it + "']" }
+ when: 'get data nodes from 1 anchor'
+ stopWatch.start()
+ def result = objectUnderTest.getDataNodesForMultipleXpaths(CPS_PERFORMANCE_TEST_DATASPACE, 'openroadm4', xpaths, INCLUDE_ALL_DESCENDANTS)
+ stopWatch.stop()
+ assert countDataNodesInTree(result) == 50 * 86
+ def durationInMillis = stopWatch.getTotalTimeMillis()
+ then: 'all data is read within 350 ms'
+ recordAndAssertPerformance("Read datatrees for multiple xpaths", 350, durationInMillis)
+ }
+
+ def 'Read complete data trees using #scenario.'() {