本文整理汇总了Java中org.cloudbus.cloudsim.Cloudlet.SUCCESS属性的典型用法代码示例。如果您正苦于以下问题:Java Cloudlet.SUCCESS属性的具体用法?Java Cloudlet.SUCCESS怎么用?Java Cloudlet.SUCCESS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.cloudbus.cloudsim.Cloudlet
的用法示例。
在下文中一共展示了Cloudlet.SUCCESS属性的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printCloudlet
private static void printCloudlet(Cloudlet cloudlet) {
Log.print(String.format(fInt, cloudlet.getCloudletId()));
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.print(String.format(fString, "SUCCESS"));
Log.print(String.format(fInt, cloudlet.getResourceId()));
Log.print(String.format(fInt, cloudlet.getVmId()));
Log.print(String.format(fInt, cloudlet.getCloudletLength()));
Log.print(String.format(fFloat, cloudlet.getActualCPUTime()));
Log.print(String.format(fFloat, cloudlet.getExecStartTime()));
Log.print(String.format(fFloat, cloudlet.getFinishTime()));
Log.print("\n");
}
else {
Log.printLine("FAILED");
}
}
示例2: printCloudlet
private void printCloudlet(Cloudlet cloudlet) {
String content = String.format(fInt, cloudlet.getCloudletId());
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
content = content +
String.format(fString, "SUCCESS") +
String.format(fInt, cloudlet.getResourceId()) +
String.format(fInt, cloudlet.getVmId()) +
String.format(fInt, cloudlet.getCloudletLength()) +
String.format(fFloat, cloudlet.getActualCPUTime()) +
String.format(fFloat, cloudlet.getExecStartTime()) +
String.format(fFloat, cloudlet.getFinishTime());
}
else {
content += "FAILED";
}
append(content);
}
示例3: printCloudletList
/**
* Prints the Cloudlet objects
* @param list list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
"Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
Log.print("SUCCESS");
DecimalFormat dft = new DecimalFormat("###.##");
Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
indent + indent + dft.format(cloudlet.getFinishTime()));
}
}
}
示例4: printCloudletList
/**
* Prints the Cloudlet objects
* @param list list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
"Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
Log.print("SUCCESS");
Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
indent + indent + dft.format(cloudlet.getFinishTime()));
}
}
}
示例5: printCloudletList
/**
* Prints the Cloudlet objects
* @param list list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
"Data center ID" + indent + "VM ID" + indent + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
Log.print("SUCCESS");
Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
indent + indent + indent + dft.format(cloudlet.getActualCPUTime()) +
indent + indent + dft.format(cloudlet.getExecStartTime())+ indent + indent + indent + dft.format(cloudlet.getFinishTime()));
}
}
}
示例6: printCloudletList
/**
* Prints the Cloudlet objects.
*
* @param list list of Cloudlets
*/
public static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = "\t";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Resource ID" + indent + "VM ID" + indent
+ "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId());
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.printLine(indent + "SUCCESS" + indent + indent + cloudlet.getResourceId() + indent
+ cloudlet.getVmId() + indent + dft.format(cloudlet.getActualCPUTime()) + indent
+ dft.format(cloudlet.getExecStartTime()) + indent + indent
+ dft.format(cloudlet.getFinishTime()));
}
}
}
示例7: printCloudletList
/**
* Prints the Cloudlet objects
* @param list list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent +
"Data center ID" + indent + "VM ID" + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS){
Log.print("SUCCESS");
Log.printLine( indent + indent + cloudlet.getResourceId() + indent + indent + indent + cloudlet.getVmId() +
indent + indent + dft.format(cloudlet.getActualCPUTime()) + indent + indent + dft.format(cloudlet.getExecStartTime())+
indent + indent + dft.format(cloudlet.getFinishTime()));
}
}
}
示例8: printCloudlet
private static void printCloudlet(Cloudlet cloudlet) {
Log.print(String.format(LogPrinter.fInt, cloudlet.getCloudletId()));
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.print(String.format(LogPrinter.fString, "SUCCESS"));
Log.print(String.format(LogPrinter.fInt, cloudlet.getResourceId()));
Log.print(String.format(LogPrinter.fInt, cloudlet.getVmId()));
Log.print(String.format(LogPrinter.fInt, cloudlet.getCloudletLength()));
Log.print(String.format(LogPrinter.fFloat, cloudlet.getActualCPUTime()));
Log.print(String.format(LogPrinter.fFloat, cloudlet.getExecStartTime()));
Log.print(String.format(LogPrinter.fFloat, cloudlet.getFinishTime()));
Log.print("\n");
}
else {
Log.printLine("FAILED");
}
}
示例9: printCloudletList
/**
* Prints the Cloudlet objects.
*
* @param list
* list of Cloudlets
* @throws IOException
*/
private static void printCloudletList(List<Cloudlet> list) throws IOException {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Data center ID" + indent + "VM ID"
+ indent + "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.print("SUCCESS");
Log.printLine(indent + indent + cloudlet.getResourceId() + indent + indent + indent
+ cloudlet.getVmId() + indent + indent + dft.format(cloudlet.getActualCPUTime())
+ indent + indent + dft.format(cloudlet.getExecStartTime()) + indent + indent
+ dft.format(cloudlet.getFinishTime()));
}
}
}
示例10: printCloudletList
/**
* Prints the Cloudlet objects
*
* @param list
* list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent + "Data center ID" + indent + "VM ID"
+ indent + indent + "Time" + indent + "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.print("SUCCESS");
Log.printLine(indent + indent + cloudlet.getResourceId() + indent + indent + indent
+ cloudlet.getVmId() + indent + indent + indent
+ dft.format(cloudlet.getActualCPUTime()) + indent + indent
+ dft.format(cloudlet.getExecStartTime()) + indent + indent + indent
+ dft.format(cloudlet.getFinishTime()));
}
}
}
示例11: printCloudletList
/**
* Prints the Cloudlet objects.
*
* @param list list of Cloudlets
*/
private static void printCloudletList(List<Cloudlet> list) {
int size = list.size();
Cloudlet cloudlet;
String indent = " ";
Log.printLine();
Log.printLine("========== OUTPUT ==========");
Log.printLine("Cloudlet ID" + indent + "STATUS" + indent
+ "Data center ID" + indent + "VM ID" + indent + "Time" + indent
+ "Start Time" + indent + "Finish Time");
DecimalFormat dft = new DecimalFormat("###.##");
for (int i = 0; i < size; i++) {
cloudlet = list.get(i);
Log.print(indent + cloudlet.getCloudletId() + indent + indent);
if (cloudlet.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.print("SUCCESS");
Log.printLine(indent + indent + cloudlet.getResourceId()
+ indent + indent + indent + cloudlet.getVmId()
+ indent + indent
+ dft.format(cloudlet.getActualCPUTime()) + indent
+ indent + dft.format(cloudlet.getExecStartTime())
+ indent + indent
+ dft.format(cloudlet.getFinishTime()));
}
}
}
示例12: processCloudletReturn
@Override
protected void processCloudletReturn(SimEvent ev) {
// determine what kind of task was finished,
Task task = (Task) ev.getData();
Vm vm = availableVms.get(task.getVmId());
Host host = vm.getHost();
if (task.getCloudletStatus() == Cloudlet.SUCCESS) {
Log.printLine(CloudSim.clock() + ": " + getName() + ": VM # " + task.getVmId() + " completed Task # " + task.getCloudletId() + " \"" + task.getName()
+ " " + task.getParams() + " \"");
// free task slots occupied by finished / cancelled tasks
idleTaskSlots.add(vm);
taskSucceeded(task, vm);
// update the task queue by traversing the successor nodes in the
// workflow
for (DataDependency outgoingEdge : task.getWorkflow().getGraph().getOutEdges(task)) {
if (host instanceof DynamicHost) {
DynamicHost dHost = (DynamicHost) host;
dHost.addFile(outgoingEdge.getFile());
}
Task child = task.getWorkflow().getGraph().getDest(outgoingEdge);
child.decNDataDependencies();
if (child.readyToExecute()) {
taskReady(child);
}
}
} else {
Log.printLine(CloudSim.clock() + ": " + getName() + ": VM # " + task.getVmId() + " encountered an error with Task # " + task.getCloudletId() + " \""
+ task.getName() + " " + task.getParams() + " \"");
runningTasks.remove(task.getCloudletId());
if (!task.isSpeculativeCopy()) {
resetTask(task);
taskReady(task);
}
idleTaskSlots.add(vm);
taskFailed(task, vm);
}
if (tasksRemaining()) {
submitTasks();
} else if (signalFinished() || (idleTaskSlots.size() == getVmsCreatedList().size() * getTaskSlotsPerVm())) {
Log.printLine(CloudSim.clock() + ": " + getName() + ": All Tasks executed. Finishing...");
terminate();
clearDatacenters();
finishExecution();
}
}