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
Metric Service Class to determine Lack of Message Level Cohesion (LMC) metric between microservice operations
LMC = sum(1 - ((iDS + oDS) / 2)) / numberOfPairs
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
evaluate()
Evaluate lack of message level cohesioninputDataSimilarity
(Operation firstOperation, Operation secondOperation) Measure the data input similarity of two given operationsoutputDataSimilarity
(Operation firstOperation, Operation secondOperation) Measure the data output similarity of two given operationsMethods inherited from class edu.university.ecs.lab.detection.metrics.services.AbstractMetric
getMetricName, getResult, getServiceDescriptor, setMetricName, setResult, setServiceDescriptor
-
Constructor Details
-
LackOfMessageLevelCohesion
public LackOfMessageLevelCohesion()
-
-
Method Details
-
evaluate
public void evaluate()Evaluate lack of message level cohesion -
inputDataSimilarity
Measure the data input similarity of two given operations- Parameters:
firstOperation
- first operation to compare data inputsecondOperation
- second operation to compare data input- Returns:
- 1.0 if there are no operation input parameters, otherwise double measure of data input similarity
-
outputDataSimilarity
Measure the data output similarity of two given operations- Parameters:
firstOperation
- first operation to compare data inputsecondOperation
- second operation to compare data input- Returns:
- 1.0 if the operations share a response type, otherwise 0.0
-