Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

$Stat*

# User-specific stuff:
.idea/
.idea/**/workspace.xml
.idea/**/tasks.xml

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Java template
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Eclipse template

.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/
### JDeveloper template
# default application storage directory used by the IDE Performance Cache feature
.data/

# used for ADF styles caching
temp/

# default output directories
classes/
deploy/
javadoc/
target/

# lock file, a part of Oracle Credential Store Framework
cwallet.sso.lck
*.iml
/Results/
Results/
Binary file added Auction-vs-Balanced.xlsx
Binary file not shown.
Binary file added Stat Collection.xlsx
Binary file not shown.
Binary file added Stats-Results1.xlsx
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ConstantsExamples {
public static final boolean ENABLE_OUTPUT = true;
public static final boolean OUTPUT_CSV = false;
public static final double SCHEDULING_INTERVAL = 300.0D;
public static final double SIMULATION_LIMIT = 87400.0D;
public static final double SIMULATION_LIMIT = 86400.0D;
/**
* Cloudlet specs
*/
Expand Down Expand Up @@ -71,10 +71,12 @@ public class ConstantsExamples {
* population.
*/

public static final int NUMBER_HOSTS = 2;
public static final int NUMBER_VMS = 5;
public static final int NUMBER_CLOUDLETS = 2;

public static final int NUMBER_HOSTS = 20;
public static final int NUMBER_VMS = 25;
public static final int NUMBER_CLOUDLETS = 50;
// public static final String CONTAINER_VM_TYPE = "PowerContainerVm";
public static final String CONTAINER_VM_TYPE = "BidderContainerVM";

//-----------------------The Addresses

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ public static void main(String[] args) {
/**
* 9- Creating the cloudlet, container and VM lists for submitting to the broker.
*/
cloudletList = createContainerCloudletList(brokerId, ConstantsExamples.NUMBER_CLOUDLETS);
// cloudletList = createContainerCloudletList(brokerId, ConstantsExamples.NUMBER_CLOUDLETS);
cloudletList = HelperEx.createContainerCloudletList(brokerId, ContainerCloudSimExample1.class.getClassLoader().getResource("workload/planetlab").getPath(), ConstantsExamples.NUMBER_CLOUDLETS);
containerList = createContainerList(brokerId, ConstantsExamples.NUMBER_CLOUDLETS);
vmList = createVmList(brokerId, ConstantsExamples.NUMBER_VMS);
/**
Expand Down Expand Up @@ -193,7 +194,8 @@ public static void main(String[] args) {
* 15- Printing the results when the simulation is finished.
*/
List<ContainerCloudlet> newList = broker.getCloudletReceivedList();
printCloudletList(newList);
// List<ContainerCloudlet> newList = broker.getCloudletList();
HelperEx.printCloudletList(newList);

Log.printLine("ContainerCloudSimExample1 finished!");
} catch (Exception e) {
Expand Down Expand Up @@ -244,41 +246,6 @@ private static ContainerDatacenterBroker createBroker(int overBookingFactor) {
return broker;
}

/**
* Prints the Cloudlet objects.
*
* @param list list of Cloudlets
*/
private static void printCloudletList(List<ContainerCloudlet> 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.getCloudletStatusString() == "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()));
}
}
}

/**
* Create the Virtual machines and add them to the list
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import java.io.IOException;
import java.nio.file.Paths;

/**
* This Example is following the format for {@link org.cloudbus.cloudsim.examples.power.planetlab.Dvfs}
Expand Down Expand Up @@ -35,7 +36,7 @@ public static void main(String[] args) throws IOException {
/**
* The output folder for the logs. The log files would be located in this folder.
*/
String outputFolder = "~/Results";
String outputFolder = Paths.get(".").toAbsolutePath().normalize().toString() + "/Results";
/**
* The allocation policy for VMs.
*/
Expand Down
Loading