Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private List<AwsEc2Template> readAllAvailableAwsEc2Instances() throws IOExceptio

public Vm createVm(final DatacenterBroker broker, final int id) {
final AwsEc2Template template = getTemplate(broker);
final Vm vm = new VmSimple(id, new CoreCapacity(template.getCpus(), VM_MIPS));
final Vm vm = VmSimple.of(id, new CoreCapacity(template.getCpus(), VM_MIPS));
vm
.setRam(template.getMemoryInMB()).setBw(VM_BW).setSize(VM_SIZE)
.setCloudletScheduler(new CloudletSchedulerTimeShared())
Expand Down Expand Up @@ -302,7 +302,7 @@ public Cloudlet createCloudlet(final DatacenterBroker broker) {
final UtilizationModel um = new UtilizationModelDynamic(UtilizationModel.Unit.ABSOLUTE, 50);

final Cloudlet cloudlet
= new CloudletSimple(nextCloudletId(), length, CLOUDLET_CORES)
= CloudletSimple.of(nextCloudletId(), length, CLOUDLET_CORES)
.setFileSize(CLOUDLET_FILESIZE)
.setOutputSize(CLOUDLET_OUTPUTSIZE)
.setUtilizationModelCpu(new UtilizationModelFull())
Expand All @@ -322,7 +322,7 @@ protected Datacenter createDatacenter(final int index) {
protected Host createHost(final int id) {
final var cpuCapacity = new CoreCapacity(HOST_CORES, 8000);

final Host host = new HostSimple(HOST_RAM, HOST_BW, HOST_STORAGE, cpuCapacity)
final Host host = HostSimple.of(HOST_RAM, HOST_BW, HOST_STORAGE, cpuCapacity)
.setRamAllocator(new ResourceAllocatorSimple())
.setBwAllocator(new ResourceAllocatorSimple())
.setVmScheduler(new VmSchedulerTimeShared());
Expand Down Expand Up @@ -356,7 +356,7 @@ private void createFaultInjectionForHosts(final Datacenter datacenter) {
/// @return the cloned (new) VM.
/// @see #createFaultInjectionForHosts(Datacenter)
private Vm cloneVm(final Vm vm) {
final Vm clone = new VmSimple(vm.getProcessor().toCoreCapacity());
final Vm clone = VmSimple.of(vm.getProcessor().toCoreCapacity());
/*
It' not required to set an ID for the clone.
It is being set here just to make it easy to
Expand Down Expand Up @@ -403,7 +403,7 @@ private List<Cloudlet> cloneCloudlets(final Vm sourceVm) {
/// @return the cloned (new) cloudlet
private Cloudlet cloneCloudlet(final Cloudlet source, final long length) {
final Cloudlet clone
= new CloudletSimple(length, (int) source.getRequiredCores());
= CloudletSimple.of(length, (int) source.getRequiredCores());
/*It' not required to set an ID for the clone.
It is being set here just to make it easy to
relate the ID of the cloudlet to its clone,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected final Host createHost(final int id) {

final var cpuCapacity = new CoreCapacity(HOST_CORES, 100000);

final Host host = new HostSimple(40960, 10000000, 10000000, cpuCapacity)
final Host host = HostSimple.of(40960, 10000000, 10000000, cpuCapacity)
.setRamAllocator(new ResourceAllocatorSimple())
.setBwAllocator(new ResourceAllocatorSimple())
.setVmScheduler(new VmSchedulerTimeShared());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ protected Cloudlet createCloudlet(final DatacenterBroker broker) {
final int p = (int) (randCloudletPes.sample() * CLOUDLET_CORES.length);
final long length = CLOUDLET_LENGTHS[i];
final long pes = CLOUDLET_CORES[p];
return new CloudletSimple(nextCloudletId(), length, pes)
return CloudletSimple.of(nextCloudletId(), length, pes)
.setFileSize(1024)
.setOutputSize(1024)
.setUtilizationModelBw(model)
Expand All @@ -162,7 +162,7 @@ protected Vm createVm(final DatacenterBroker broker, final int id) {
final int mips = MIPS_VM[mipdsId];


final Vm vm = new VmSimple(id, new CoreCapacity(pes, mips))
final Vm vm = VmSimple.of(id, new CoreCapacity(pes, mips))
.setRam(512).setBw(1000).setSize(10000)
.setCloudletScheduler(new CloudletSchedulerCompletelyFair());
return vm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ protected Vm createVm(final DatacenterBroker broker, final int id) {
final int pesId = (int) (randVm.sample() * VM_CORES.length);
final int pes = VM_CORES[pesId];

final Vm vm = new VmSimple(id, new CoreCapacity(pes, 1000))
final Vm vm = VmSimple.of(id, new CoreCapacity(pes, 1000))
.setRam(512).setBw(1000).setSize(10000)
.setCloudletScheduler(new CloudletSchedulerTimeShared());
return vm;
Expand All @@ -119,7 +119,7 @@ protected Cloudlet createCloudlet(final DatacenterBroker broker) {
final int i = (int) (randCloudlet.sample() * CLOUDLET_LENGTHS.length);
final long length = CLOUDLET_LENGTHS[i];

return new CloudletSimple(nextCloudletId(), length, 2)
return CloudletSimple.of(nextCloudletId(), length, 2)
.setFileSize(1024)
.setOutputSize(1024)
.setUtilizationModel(new UtilizationModelFull());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected Vm createVm(final DatacenterBroker broker, final int id) {
final int pes = VM_CORES[pesId];
final int mips = VM_MIPS[mipsId];

final Vm vm = new VmSimple(id, new CoreCapacity(pes, mips))
final Vm vm = VmSimple.of(id, new CoreCapacity(pes, mips))
.setRam(512).setBw(1000).setSize(10000)
.setCloudletScheduler(new CloudletSchedulerTimeShared());
return vm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected Vm createVm(final DatacenterBroker broker, final int id) {
final int pesId = (int) (randVm.sample() * VM_CORES.length);
final int pes = VM_CORES[pesId];

Vm vm = new VmSimple(id, new CoreCapacity(pes, 1000))
Vm vm = VmSimple.of(id, new CoreCapacity(pes, 1000))
.setRam(512).setBw(1000).setSize(10000)
.setCloudletScheduler(new CloudletSchedulerCompletelyFair());
return vm;
Expand Down
Loading