本文整理汇总了Java中org.cloudbus.cloudsim.lists.HostList.getNumberOfPes方法的典型用法代码示例。如果您正苦于以下问题:Java HostList.getNumberOfPes方法的具体用法?Java HostList.getNumberOfPes怎么用?Java HostList.getNumberOfPes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.cloudbus.cloudsim.lists.HostList
的用法示例。
在下文中一共展示了HostList.getNumberOfPes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMips
import org.cloudbus.cloudsim.lists.HostList; //导入方法依赖的package包/类
/**
* Gets the total MIPS rating, which is the sum of MIPS rating of all machines in a resource.
* <p>
* Total MIPS rating for:
* <ul>
* <li>TimeShared = 1 Rating of a Pe * Total number of PEs
* <li>Other policy same rating = same as TimeShared
* <li>SpaceShared = Sum of all PEs in all Machines
* <li>Other policy different rating = same as SpaceShared
* <li>Advance Reservation = 0 or unknown. You need to calculate this manually.
* </ul>
*
* @return the sum of MIPS ratings
* @pre $none
* @post $result >= 0
*/
public int getMips() {
int mips = 0;
switch (getAllocationPolicy()) {
// Assuming all PEs in all Machine have same rating.
case DatacenterCharacteristics.TIME_SHARED:
case DatacenterCharacteristics.OTHER_POLICY_SAME_RATING:
mips = getMipsOfOnePe() * HostList.getNumberOfPes(getHostList());
break;
// Assuming all PEs in a given Machine have the same rating.
// But different machines in a Cluster can have different rating
case DatacenterCharacteristics.SPACE_SHARED:
case DatacenterCharacteristics.OTHER_POLICY_DIFFERENT_RATING:
for (Host host : getHostList()) {
mips += host.getTotalMips();
}
break;
default:
break;
}
return mips;
}
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:41,代码来源:DatacenterCharacteristics.java
示例2: getMips
import org.cloudbus.cloudsim.lists.HostList; //导入方法依赖的package包/类
/**
* Gets the total MIPS rating, which is the sum of MIPS rating of all machines in a resource.
* <p>
* Total MIPS rating for:
* <ul>
* <li>TimeShared = 1 Rating of a Pe * Total number of PEs
* <li>Other policy same rating = same as TimeShared
* <li>SpaceShared = Sum of all PEs in all Machines
* <li>Other policy different rating = same as SpaceShared
* <li>Advance Reservation = 0 or unknown. You need to calculate this manually.
* </ul>
*
* @return the sum of MIPS ratings
* @pre $none
* @post $result >= 0
*/
public int getMips() {
int mips = 0;
switch (getAllocationPolicy()) {
// Assuming all PEs in all Machine have same rating.
case FogDeviceCharacteristics.TIME_SHARED:
case FogDeviceCharacteristics.OTHER_POLICY_SAME_RATING:
mips = getMipsOfOnePe() * HostList.getNumberOfPes(getHostList());
break;
// Assuming all PEs in a given Machine have the same rating.
// But different machines in a Cluster can have different rating
case FogDeviceCharacteristics.SPACE_SHARED:
case FogDeviceCharacteristics.OTHER_POLICY_DIFFERENT_RATING:
for (Host host : getHostList()) {
mips += host.getTotalMips();
}
break;
default:
break;
}
return mips;
}
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:41,代码来源:FogDeviceCharacteristics.java
示例3: getNumberOfPes
import org.cloudbus.cloudsim.lists.HostList; //导入方法依赖的package包/类
@Override
public int getNumberOfPes() {
return HostList.getNumberOfPes(getHostList());
}
示例4: getNumberOfPes
import org.cloudbus.cloudsim.lists.HostList; //导入方法依赖的package包/类
/**
* Gets the total number of PEs for all Machines.
*
* @return number of PEs
* @pre $none
* @post $result >= 0
*/
public int getNumberOfPes() {
return HostList.getNumberOfPes(getHostList());
}
开发者ID:gmartinezramirez,项目名称:Fog-Computing-Mobile-Architecture,代码行数:11,代码来源:DatacenterCharacteristics.java