Class LackOfMessageLevelCohesion

java.lang.Object
edu.university.ecs.lab.detection.metrics.services.AbstractMetric
edu.university.ecs.lab.detection.metrics.services.LackOfMessageLevelCohesion
All Implemented Interfaces:
IMetric

public class LackOfMessageLevelCohesion extends AbstractMetric
Metric Service Class to determine Lack of Message Level Cohesion (LMC) metric between microservice operations LMC = sum(1 - ((iDS + oDS) / 2)) / numberOfPairs
  • Constructor Details

    • LackOfMessageLevelCohesion

      public LackOfMessageLevelCohesion()
  • Method Details

    • evaluate

      public void evaluate()
      Evaluate lack of message level cohesion
    • inputDataSimilarity

      public Double inputDataSimilarity(Operation firstOperation, Operation secondOperation)
      Measure the data input similarity of two given operations
      Parameters:
      firstOperation - first operation to compare data input
      secondOperation - second operation to compare data input
      Returns:
      1.0 if there are no operation input parameters, otherwise double measure of data input similarity
    • outputDataSimilarity

      public Double outputDataSimilarity(Operation firstOperation, Operation secondOperation)
      Measure the data output similarity of two given operations
      Parameters:
      firstOperation - first operation to compare data input
      secondOperation - second operation to compare data input
      Returns:
      1.0 if the operations share a response type, otherwise 0.0