then: 'the schema set is persisted correctly'
def result = cpsModuleService.getSchemaSet(CPS_PERFORMANCE_TEST_DATASPACE, 'perfSchemaSet')
result.moduleReferences.size() == 200
- and: 'identification of new module resources is fast enough (1,000 executions less then 6,000 milliseconds)'
+ and: 'identification of new module resources is fast enough (100 executions less then 2,000 milliseconds)'
def stopWatch = new StopWatch()
- 1000.times() {
+ 100.times() {
def moduleReferencesToCheck = createModuleReferencesWithRandomMatchingExistingModuleReferences()
stopWatch.start()
def newModuleReferences = objectUnderTest.identifyNewModuleReferences(moduleReferencesToCheck)
stopWatch.stop()
assert newModuleReferences.size() > 0 && newModuleReferences.size() < 300
}
- assert stopWatch.getTotalTimeMillis() < 10_000
+ recordAndAssertResourceUsage('NCMP: Create large schema set', 2, stopWatch.getTotalTimeSeconds(), 3, 0)
}
def createModuleReferencesWithRandomMatchingExistingModuleReferences() {
resourceMeter.stop()
def deleteDurationInSeconds = resourceMeter.getTotalTimeInSeconds()
then: 'delete duration is below accepted margin (3x) of the expected average'
- recordAndAssertResourceUsage('Batch delete 100 whole lists', 3.0, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB(), 4)
+ recordAndAssertResourceUsage('Batch delete 100 whole lists', 2.4, deleteDurationInSeconds, 3, resourceMeter.getTotalMemoryUsageInMB(), 4)
}
def 'Delete 1 large data node'() {
resourceMeter.stop()
def deleteDurationInSeconds = resourceMeter.getTotalTimeInSeconds()
then: 'delete duration is below accepted margin of the expected average'
- recordAndAssertResourceUsage('Delete data nodes for anchor', 1.8, deleteDurationInSeconds, 1, resourceMeter.getTotalMemoryUsageInMB())
+ recordAndAssertResourceUsage('Delete data nodes for anchor', 1.9, deleteDurationInSeconds, 1, resourceMeter.getTotalMemoryUsageInMB())
}
def 'Batch delete 100 non-existing nodes'() {
where: 'the following parameters are used'
scenario | fetchDescendantsOption || expectedDuration | memoryLimit | expectedNumberOfDataNodes
'no descendants' | OMIT_DESCENDANTS || 0.01 | 1 | 1
- 'direct descendants' | DIRECT_CHILDREN_ONLY || 0.05 | 5 | 1 + OPENROADM_DEVICES_PER_ANCHOR
+ 'direct descendants' | DIRECT_CHILDREN_ONLY || 0.045 | 5 | 1 + OPENROADM_DEVICES_PER_ANCHOR
'all descendants' | INCLUDE_ALL_DESCENDANTS || 1.1 | 250 | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
}
then: 'no data is returned'
assert result.isEmpty()
and: 'the operation completes within within expected time'
- recordAndAssertResourceUsage("Read non-existing xpaths", 0.15, durationInSeconds, 2, resourceMeter.getTotalMemoryUsageInMB())
+ recordAndAssertResourceUsage("Read non-existing xpaths", 0.06, durationInSeconds, 2, resourceMeter.getTotalMemoryUsageInMB())
}
def 'Read complete data trees using #scenario.'() {
where: 'the following xpaths are used'
scenario | xpath || expectedDuration | memoryLimit | expectedNumberOfDataNodes
'openroadm root' | '/' || 1 | 250 | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
- 'openroadm top element' | '/openroadm-devices' || 1.0 | 250 | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
+ 'openroadm top element' | '/openroadm-devices' || 0.95 | 250 | 1 + OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
'openroadm whole list' | '/openroadm-devices/openroadm-device' || 1.06 | 250 | OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
}
recordAndAssertResourceUsage("Query with ${scenario}", expectedDuration, durationInSeconds, memoryLimit, resourceMeter.getTotalMemoryUsageInMB(),2)
where: 'the following parameters are used'
scenario | fetchDescendantsOption || expectedDuration | memoryLimit | expectedNumberOfDataNodes
- 'no descendants' | OMIT_DESCENDANTS || 0.08 | 6 | OPENROADM_DEVICES_PER_ANCHOR
+ 'no descendants' | OMIT_DESCENDANTS || 0.09 | 6 | OPENROADM_DEVICES_PER_ANCHOR
'direct descendants' | DIRECT_CHILDREN_ONLY || 0.12 | 12 | OPENROADM_DEVICES_PER_ANCHOR * 2
'all descendants' | INCLUDE_ALL_DESCENDANTS || 1.05 | 200 | OPENROADM_DEVICES_PER_ANCHOR * OPENROADM_DATANODES_PER_DEVICE
}
where:
scenario | totalNodes | startId | changeLeaves || expectedTime | memoryLimit
'Replace 0 nodes with 100' | 100 | 1 | false || 3.0 | 200
- 'Replace 100 using same data' | 100 | 1 | false || 5.0 | 200
+ 'Replace 100 using same data' | 100 | 1 | false || 5.5 | 200
'Replace 100 with new leaf values' | 100 | 1 | true || 5.4 | 200
'Replace 100 with 100 new nodes' | 100 | 101 | false || 9.3 | 200
'Replace 50 existing and 50 new' | 100 | 151 | true || 7.3 | 200
'Replace list of 100 using same data' | 100 | 1 | false || 5.5 | 200
'Replace list of 100 with new leaf values' | 100 | 1 | true || 5.5 | 200
'Replace list with 100 new nodes' | 100 | 101 | false || 9.0 | 200
- 'Replace list with 50 existing and 50 new' | 100 | 151 | true || 7.0 | 200
+ 'Replace list with 50 existing and 50 new' | 100 | 151 | true || 8.0 | 200
'Replace list of 100 nodes with 1' | 1 | 1 | false || 5.9 | 200
}
totalNodes || expectedDuration | memoryLimit
50 || 1.5 | 100
100 || 3.0 | 200
- 200 || 7.1 | 400
- 400 || 12.5 | 500
+ 200 || 6.4 | 400
+ 400 || 14.0 | 500
}
}
then: 'all alternate ids are resolved correctly'
assert count == 100
and: 'average performance is as expected'
- recordAndAssertResourceUsage('Look up CM-handle by alternate-id', 1.4, resourceMeter.totalTimeInSeconds, 15, resourceMeter.totalMemoryUsageInMB)
+ recordAndAssertResourceUsage('Look up CM-handle by alternate-id', 1.75, resourceMeter.totalTimeInSeconds, 15, resourceMeter.totalMemoryUsageInMB)
}
def 'A batch of CM-handles is looked up by alternate id.'() {