Commit 21c2db4f authored by esabate's avatar esabate

Added throughput attribute in CommunicationLink. Updated COMPSsApplication and...

Added throughput attribute in CommunicationLink. Updated COMPSsApplication and Worker solving some issues. Updated README with changes.
parent 1f0c17dd
......@@ -27,15 +27,16 @@ Registered model has the following representation:
| | | | | - float energyThreshold | | - String IPNode2 |
+--------------------------+ | - int PID | | - float cpuThreshold | | - float delayRTT |
^* | - boolean active | | - int numCores | | - float PLR |
| | - float cpuUsage | | | | |
| | - float energyUsage | +--------------------------+ +---------------------+
| | - int computingUnits | ^*
| | - String ip | |
| | - float cpuUsage | | | | - float throughput |
| | - float energyUsage | +--------------------------+ | |
| | - int computingUnits | ^* +---------------------+
| | - String ip | |
| | - float communicationCost | |
| | - float deadlinesMissedRatio | |
| | - List<String> deactivationReasons | |
| | | |
| +-------------------------------------+ |
| |
|1 |
+---------+---------+ |
| | |
......
......@@ -139,7 +139,7 @@ public class COMPSsApplication {
* Get application deadlines missed ratio attribute
* @return deadlinesMissed
*/
public int getDeadlinesMissedRatio() { return this.deadlinesMissed; }
public float getDeadlinesMissedRatio() { return this.deadlinesMissed; }
/**
* Set application's deadlines missed ratio
......
......@@ -22,6 +22,9 @@ public class CommunicationLink extends DataClayObject {
/** Packet Loss Rate. */
private float plr;
/** Throughput value. */
private float throughput;
/** List of all nodes present in a given communication list. */
private List<Node> nodes = new ArrayList<>();
......@@ -34,13 +37,15 @@ public class CommunicationLink extends DataClayObject {
* @param ipNode2 IP for Node 2
* @param delayRtt Delay RTT obtained in the communication link
* @param plr Packet loss rate metric obtained in the link
* @param throughput Throughput metric obtained in the link
*/
public CommunicationLink(final Node node1, final Node node2, final String ipNode1, final String ipNode2,
final float delayRtt, final float plr) {
final float delayRtt, final float plr, final float throughput) {
this.ipNode1 = ipNode1;
this.ipNode2 = ipNode2;
this.delayRtt = delayRtt;
this.plr = plr;
this.throughput = throughput;
this.nodes.add(node1);
this.nodes.add(node2);
}
......@@ -93,11 +98,24 @@ public class CommunicationLink extends DataClayObject {
*/
public void setPlr(final float plr) { this.plr = plr; }
/**
* Get the throughput value present in the communication link between node 1 and node 2
* @return float throughput
*/
public float getThroughput() { return this.throughput; }
/**
* Set the throughput value present in the communication link between node 1 and node 2
* @param throughput float
*/
public void setThroughput(final float throughput) { this.throughput = throughput; }
@Override
public String toString() {
return " communication link { IP Node 1 = " + getIpNode1() + " , IP Node 2 = " + getIpNode2()
+ ", Delay RTT = " + getDelayRtt() + ", PLR = " + getPlr() + "}";
+ ", Delay RTT = " + getDelayRtt() + ", PLR = " + getPlr() + ", Throughput = " + getThroughput()
+ "}";
}
}
......@@ -33,7 +33,7 @@ public class Worker extends DataClayObject {
private float communicationCost;
/** Float representing the ratio of deadlines missed for a particular worker. */
private float deadlinesMissRatio;
private float deadlinesMissedRatio;
/** Worker IP. */
private String ip;
......@@ -71,7 +71,7 @@ public class Worker extends DataClayObject {
this.ip = ip;
this.communicationCost = communicationCost;
this.deactivationReasons = deactivationReasons;
this.deadlinesMissRatio = 0;
this.deadlinesMissedRatio = 0;
}
/**
......@@ -157,15 +157,15 @@ public class Worker extends DataClayObject {
/** Get current deadlines missed ratio of worker
* @return float deadlinesMissedRatio
*/
public float getDeadlinesMissRatio() {
return deadlinesMissRatio;
public float getDeadlinesMissedRatio() {
return deadlinesMissedRatio;
}
/**
* Set current deadlines missed ratio of worker
* @param deadlinesMissedRatio float
*/
public void setdeadlinesMissedRatio(final float deadlinesMissedRatio) {
public void setDeadlinesMissedRatio(final float deadlinesMissedRatio) {
this.deadlinesMissedRatio = deadlinesMissedRatio;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment