Skip to content

Benchmark

Description

To benchmark our implementation of a Variability4TOSCA processor, we run several tests. Thereby, a service template is generated and then resolved based on a seed. A seed of value n results in 2n node templates and 2n relationship templates, thus, 4n templates. For example, a seed of 10,000 generates 20,0000 node templates and 20,0000 relationship templates. When variability is resolved, n node templates and n relationship templates are removed.

Variable Service Template

The variability of the following variable service template shall be resolved.

tosca_definitions_version: tosca_variability_1_0
topology_template:
    variability:
        inputs:
            mode:
                type: string
        expressions:
            condition_0_present:
                equal:
                    - variability_input: mode
                    - present
            condition_0_removed:
                equal:
                    - variability_input: mode
                    - absent
            condition_1_present:
                equal:
                    - variability_input: mode
                    - present
            condition_1_removed:
                equal:
                    - variability_input: mode
                    - absent
        options:
            type_default_condition: true
    node_templates:
        component_0_present:
            type: component_type_0_present
            conditions:
                logic_expression: condition_0_present
            requirements:
                - relation_present:
                      node: component_1_present
                      conditions:
                          logic_expression: condition_0_present
                      relationship: relationship_0_present
                - relation_removed:
                      node: component_1_removed
                      conditions:
                          logic_expression: condition_0_removed
                      relationship: relationship_0_removed
        component_0_removed:
            type: component_type_0_removed
            conditions:
                logic_expression: condition_0_removed
        component_1_present:
            type: component_type_1_present
            conditions:
                logic_expression: condition_1_present
            requirements:
                - relation_present:
                      node: component_0_present
                      conditions:
                          logic_expression: condition_1_present
                      relationship: relationship_1_present
                - relation_removed:
                      node: component_0_removed
                      conditions:
                          logic_expression: condition_1_removed
                      relationship: relationship_1_removed
        component_1_removed:
            type: component_type_1_removed
            conditions:
                logic_expression: condition_1_removed
    relationship_templates:
        relationship_0_present:
            type: relationship_type_0_present
        relationship_0_removed:
            type: relationship_type_0_removed
        relationship_1_present:
            type: relationship_type_1_present
        relationship_1_removed:
            type: relationship_type_1_removed

Variability Inputs

When resolving variability, the following variability inputs shall be used.

mode: present

Variability-Resolved Service Template

The following variability-resolved service template is expected.

tosca_definitions_version: tosca_simple_yaml_1_3
topology_template:
    node_templates:
        component_0_present:
            type: component_type_0_present
            requirements:
                - relation_present:
                      node: component_1_present
                      relationship: relationship_0_present
        component_1_present:
            type: component_type_1_present
            requirements:
                - relation_present:
                      node: component_0_present
                      relationship: relationship_1_present
    relationship_templates:
        relationship_0_present:
            type: relationship_type_0_present
        relationship_1_present:
            type: relationship_type_1_present

Last update: October 1, 2024