Commit 1f0c17dd authored by esabate's avatar esabate

Added deadlinesMissedRatio at a COMPSs application level and Worker level....

Added deadlinesMissedRatio at a COMPSs application level and Worker level. Updated README accordingly.
parent fcdaaf30
......@@ -8,40 +8,42 @@ This model is used to communicate the NFR tool with the COMPSs orchestrator. The
Registered model has the following representation:
```
+---------------------+
| |
| Master |
| |
+-------------------------+ +---------------------+
| |1 1| | +--------------------------+
| COMPSsApplication +<------>+ - int PID | | |
| | | - String IP |* 1| Node |
+-------------------------+ | +<------------------>+ |
| | +---------------------+ +--------------------------+ +---------------------+
| - String name | | | | |
| - String uuid | +-------------------------------------+ | - String ipWifi | | CommunicationLink |
| - boolean isSecure |1 *| |* 1| - String ipEth |* *| |
| - String infoNature +<--->+ Worker +-------+ - String ipLte +<----------->+---------------------+
| - int monitoringPeriod | | | | - float signalWifi | | |
| | +-------------------------------------+ | - float energyThreshold | | - String IPNode1 |
+-------------------------+ | | | - float cpuThreshold | | - String IPNode2 |
^* | - int PID | | - int numCores | | - float delayRTT |
| | - boolean active | | | | - float PLR |
| | - float cpuUsage | +--------------------------+ | |
| | - float energyUsage | ^* +---------------------+
| | - int computingUnits | |
| | - String ip | |
| | - float communicationCost | |
| | - List<String> deactivationReasons | |
| | | |
|1 +-------------------------------------+ |
+---------+---------+ |
| | |
| ElasticSystem | |
| | |
+-------------------+ |
| |1 |
| +<---------------------------------------------------------------------+
+---------------------+
| |
| Master |
| |
+--------------------------+ +---------------------+
| |1 1| | +--------------------------+
| COMPSsApplication +<------>+ - int PID | | |
| | | - String IP |* 1| Node |
+--------------------------+ | +<------------------>+ |
| | +---------------------+ +--------------------------+ +---------------------+
| - String name | | | | |
| - String uuid | +-------------------------------------+ | - String ipWifi | | CommunicationLink |
| - boolean isSecure |1 *| |* 1| - String ipEth |* *| |
| - String infoNature +<--->+ Worker +-------+ - String ipLte +<----------->+---------------------+
| - int monitoringPeriod | | | | - float signalWifi | | |
| - float deadlinesMissed | +-------------------------------------+ | - float energyThreshold | | - String IPNode1 |
| | | | | - 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 communicationCost | |
| | - float deadlinesMissedRatio | |
| | - List<String> deactivationReasons | |
| | | |
| +-------------------------------------+ |
|1 |
+---------+---------+ |
| | |
| ElasticSystem | |
| | |
+-------------------+ |
| |1 |
| +<----------------------------------------------------------------------+
+---------+---------+
```
......
......@@ -22,6 +22,9 @@ public class COMPSsApplication {
/** Application monitoring period attribute. */
private int monitoringPeriod;
/** Application deadlines missed ratio. */
private float deadlinesMissed;
/** COMPSsApplication master process. */
private Master master;
......@@ -37,6 +40,7 @@ public class COMPSsApplication {
this.name = appName;
this.uuid = uuid;
this.monitoringPeriod = monitoringPeriod;
deadlinesMissed = 0;
}
/**
......@@ -131,6 +135,18 @@ public class COMPSsApplication {
*/
public void setMonitoringPeriod(int monitoringPeriod) { this.monitoringPeriod = monitoringPeriod; }
/**
* Get application deadlines missed ratio attribute
* @return deadlinesMissed
*/
public int getDeadlinesMissedRatio() { return this.deadlinesMissed; }
/**
* Set application's deadlines missed ratio
* @param deadlinesMissed Application's deadlines missed ratio
*/
public void setDeadlinesMissedRatio(float deadlinesMissed) { this.deadlinesMissed = deadlinesMissed; }
/**
* Remove all workers from application
*/
......
......@@ -32,6 +32,9 @@ public class Worker extends DataClayObject {
/** Float representing the communication cost of a Worker. */
private float communicationCost;
/** Float representing the ratio of deadlines missed for a particular worker. */
private float deadlinesMissRatio;
/** Worker IP. */
private String ip;
......@@ -68,6 +71,7 @@ public class Worker extends DataClayObject {
this.ip = ip;
this.communicationCost = communicationCost;
this.deactivationReasons = deactivationReasons;
this.deadlinesMissRatio = 0;
}
/**
......@@ -150,6 +154,21 @@ public class Worker extends DataClayObject {
this.energyUsage = energyUsage;
}
/** Get current deadlines missed ratio of worker
* @return float deadlinesMissedRatio
*/
public float getDeadlinesMissRatio() {
return deadlinesMissRatio;
}
/**
* Set current deadlines missed ratio of worker
* @param deadlinesMissedRatio float
*/
public void setdeadlinesMissedRatio(final float deadlinesMissedRatio) {
this.deadlinesMissedRatio = deadlinesMissedRatio;
}
/**
* Get current number of computing units of worker
* @return int computingUnits
......
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