Commit 3596dda3 authored by Anton Beloglazov's avatar Anton Beloglazov

- ClouletSchedulerSingleService renamed to CloudletSchedulerDynamicWorkload

parent 85c0db67
......@@ -14,7 +14,7 @@ import java.util.List;
import java.util.Map;
/**
* CloudletSchedulerSingleService implements a policy of
* CloudletSchedulerDynamicWorkload implements a policy of
* scheduling performed by a virtual machine assuming
* that there is just one cloudlet which is working as
* an online service.
......@@ -22,7 +22,7 @@ import java.util.Map;
* @author Anton Beloglazov
* @since CloudSim Toolkit 2.0
*/
public class CloudletSchedulerSingleService extends CloudletSchedulerTimeShared {
public class CloudletSchedulerDynamicWorkload extends CloudletSchedulerTimeShared {
/** The mips. */
private double mips;
......@@ -46,7 +46,7 @@ public class CloudletSchedulerSingleService extends CloudletSchedulerTimeShared
* @param pesNumber the pes number
* @param mips the mips
*/
public CloudletSchedulerSingleService(double mips, int pesNumber) {
public CloudletSchedulerDynamicWorkload(double mips, int pesNumber) {
super();
setMips(mips);
setPesNumber(pesNumber);
......
......@@ -38,11 +38,11 @@ public class CloudletSchedulerSingleServiceTest {
private static final double MIPS = 1000;
private static final int PES_NUMBER = 2;
private CloudletSchedulerSingleService vmScheduler;
private CloudletSchedulerDynamicWorkload vmScheduler;
@Before
public void setUp() throws Exception {
vmScheduler = new CloudletSchedulerSingleService(MIPS, PES_NUMBER);
vmScheduler = new CloudletSchedulerDynamicWorkload(MIPS, PES_NUMBER);
}
@Test
......
......@@ -68,8 +68,8 @@ public class HostTest {
@Test
public void testIsSuitableForVm() {
Vm vm0 = new Vm(0, 0, MIPS, 2, RAM, BW, 0, "", new CloudletSchedulerSingleService(MIPS, 2));
Vm vm1 = new Vm(1, 0, MIPS * 2, 1, RAM * 2, BW * 2, 0, "", new CloudletSchedulerSingleService(MIPS * 2, 2));
Vm vm0 = new Vm(0, 0, MIPS, 2, RAM, BW, 0, "", new CloudletSchedulerDynamicWorkload(MIPS, 2));
Vm vm1 = new Vm(1, 0, MIPS * 2, 1, RAM * 2, BW * 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS * 2, 2));
assertTrue(host.isSuitableForVm(vm0));
assertFalse(host.isSuitableForVm(vm1));
......@@ -77,10 +77,10 @@ public class HostTest {
@Test
public void testVmCreate() {
Vm vm0 = new Vm(0, 0, MIPS / 2, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerSingleService(MIPS / 2, 1));
Vm vm1 = new Vm(1, 0, MIPS, 1, RAM, BW, 0, "", new CloudletSchedulerSingleService(MIPS, 1));
Vm vm2 = new Vm(2, 0, MIPS * 2, 1, RAM, BW, 0, "", new CloudletSchedulerSingleService(MIPS * 2, 1));
Vm vm3 = new Vm(3, 0, MIPS / 2, 2, RAM / 2, BW / 2, 0, "", new CloudletSchedulerSingleService(MIPS / 2, 2));
Vm vm0 = new Vm(0, 0, MIPS / 2, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS / 2, 1));
Vm vm1 = new Vm(1, 0, MIPS, 1, RAM, BW, 0, "", new CloudletSchedulerDynamicWorkload(MIPS, 1));
Vm vm2 = new Vm(2, 0, MIPS * 2, 1, RAM, BW, 0, "", new CloudletSchedulerDynamicWorkload(MIPS * 2, 1));
Vm vm3 = new Vm(3, 0, MIPS / 2, 2, RAM / 2, BW / 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS / 2, 2));
assertTrue(host.vmCreate(vm0));
assertFalse(host.vmCreate(vm1));
......@@ -90,7 +90,7 @@ public class HostTest {
@Test
public void testVmDestroy() {
Vm vm = new Vm(0, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerSingleService(MIPS, 1));
Vm vm = new Vm(0, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS, 1));
assertTrue(host.vmCreate(vm));
assertSame(vm, host.getVm(0, 0));
......@@ -104,8 +104,8 @@ public class HostTest {
@Test
public void testVmDestroyAll() {
Vm vm0 = new Vm(0, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerSingleService(MIPS, 1));
Vm vm1 = new Vm(1, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerSingleService(MIPS, 1));
Vm vm0 = new Vm(0, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS, 1));
Vm vm1 = new Vm(1, 0, MIPS, 1, RAM / 2, BW / 2, 0, "", new CloudletSchedulerDynamicWorkload(MIPS, 1));
assertTrue(host.vmCreate(vm0));
assertSame(vm0, host.getVm(0, 0));
......
......@@ -38,12 +38,12 @@ public class VmTest {
private static final long SIZE = 1000;
private static final String VMM = "Xen";
private CloudletSchedulerSingleService vmScheduler;
private CloudletSchedulerDynamicWorkload vmScheduler;
private Vm vm;
@Before
public void setUp() throws Exception {
vmScheduler = new CloudletSchedulerSingleService(MIPS, PES_NUMBER);
vmScheduler = new CloudletSchedulerDynamicWorkload(MIPS, PES_NUMBER);
vm = new Vm(ID, USER_ID, MIPS, PES_NUMBER, RAM, BW, SIZE, VMM, vmScheduler);
}
......
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