Skip to content

Miss behaviour with Metrics operations #121

@jmhorcas

Description

@jmhorcas

Describe the bug
The Metrics operations called from a specific plugin (e.g., FMMetrics from fm_metamodel) returns all metrics from all plugins instead of only those metrics from that specific plugin.

To Reproduce
Steps to reproduce the behavior:

  1. Import the metric operation of a specific plugin:
from flamapy.metamodels.fm_metamodel.operations import FMMetrics # for FM
from flamapy.metamodels.bdd_metamodel.operations import BDDMetrics # for BDDs
  1. Execute the operation:
fm_metrics = FMMetrics().execute(fm_model).get_result()
bdd_metrics = BDDMetrics().execute(fm_model).get_result()  # Another issue here? "execute" expects a FM object, but a BDD object should be expected.
  1. See error, both calls returns the same set of metrics (internally, the call to FMMetrics is calling all Metrics operations from all plugins, and the same for the BDDMetrics.
    fm_metrics == bdd_metrics # True

Expected behavior
IMHO, each Metric operation should return only the metrics of its plugin, while the metaoperation in flamapy_fw (the core) should return all metrics from all plugins.

The "execute" operation in the BDD plugin should accept a BDD model object instead of a FM object for consistency with all the rest of operations in the plugin. But I understand that Metrics is a special operation and it has been developed as it on purpose.

Desktop (please complete the following information):

  • OS: Linux Mint

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions