Skip to content
Snippets Groups Projects
Commit c6e43a8f authored by Simon Spinner's avatar Simon Spinner
Browse files

Correctly detect existing sensors in repository and use them instead.

parent f36cd4e9
No related branches found
No related tags found
No related merge requests found
......@@ -613,31 +613,31 @@ public class ModelExtractionService extends AgentController implements Service<M
ComponentSensor<RequestCount> inThroughputSensor = createSensor(StandardMetrics.DEPARTURES,
RequestCount.REQUESTS, Aggregation.CUMULATIVE_SUM, componentInstance,
innerCallerProvidingRole, incomingSignature, null);
ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inThroughputSensor);
inThroughputSensor = ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inThroughputSensor);
incomingRecord.setThroughputSensor(inThroughputSensor);
ComponentSensor<Time> inResponseTimeSensor = createSensor(StandardMetrics.RESPONSE_TIME,
Time.MILLISECONDS, Aggregation.CUMULATIVE_SUM, componentInstance,
innerCallerProvidingRole, incomingSignature, null);
ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inResponseTimeSensor);
inResponseTimeSensor = ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inResponseTimeSensor);
incomingRecord.setResponseTimeSensor(inResponseTimeSensor);
ComponentSensor<Time> inResidenceTimeSensor = createSensor(StandardMetrics.RESIDENCE_TIME, Time.MILLISECONDS,
Aggregation.CUMULATIVE_SUM, componentInstance, innerCallerProvidingRole, incomingSignature, null);
ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inResidenceTimeSensor);
inResidenceTimeSensor = ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), inResidenceTimeSensor);
incomingRecord.setResidenceTimeSensor(inResidenceTimeSensor);
if (externalCall != null) {
ComponentSensor<RequestCount> outThroughputSensor = createSensor(StandardMetrics.DEPARTURES,
RequestCount.REQUESTS, Aggregation.CUMULATIVE_SUM, componentInstance,
innerCallerProvidingRole, incomingSignature, externalCall);
ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), outThroughputSensor);
outThroughputSensor = ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), outThroughputSensor);
outgoingRecord.setThroughputSensor(outThroughputSensor);
ComponentSensor<Time> outResponseTimeSensor = createSensor(StandardMetrics.RESPONSE_TIME, Time.MILLISECONDS,
Aggregation.CUMULATIVE_SUM, componentInstance, innerCallerProvidingRole, incomingSignature,
externalCall);
ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), outResponseTimeSensor);
outResponseTimeSensor = ModelSkeletonUtil.insert(skeleton.getSensors().getSensors(), outResponseTimeSensor);
outgoingRecord.setResponseTimeSensor(outResponseTimeSensor);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment