cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/test/java/org/cloudbus/cloudsim/schedulers/cloudlet/CloudletSchedulerSpaceSharedTest.java
@Test
    public void testGetTotalUtilizationOfCpu_DualPesCloudlets_NotEnoughVmPes() {
        final long mips = 1000;
        final int numberOfVmPes = 3;
        final int numberOfCloudlets = 3;
        final int numberOfCloudletPes = 2;

        final CloudletSchedulerSpaceShared instance = newSchedulerWithRunningCloudlets(mips, numberOfVmPes, numberOfCloudlets, numberOfCloudletPes);
        final double expected = 0.666;
        assertEquals(expected, instance.getRequestedCpuPercentUtilization(0), 0.001);
    }
/**
     * Submits 3 cloudlets that require 2 PEs each one, totalling 6 required PES.
     * However, since there is just 3 VM PEs, just 1 Cloudlet
     * will be added to exec list, that will use 2 of the 3 VM PEs.
     */
Submits 3 cloudlets that require 2 PEs each one, totalling 6 required PES.
However, since there is just 3 VM PEs, just 1 Cloudlet
will be added to exec list, that will use 2 of the 3 VM PEs.
Submits 3 cloudlets that require 2 PEs each one totalling 6 required PES . However since there is just 3 VM PEs just 1 Cloudlet will be added to exec list that will use 2 of the 3 VM PEs .
@Test
    public void testGetTotalUtilizationOfCpu_DualPesCloudlets_NotEnoughVmPes() {
        final long mips = 1000;
        final int numberOfVmPes = 3;
        final int numberOfCloudlets = 3;
        final int numberOfCloudletPes = 2;
        final CloudletSchedulerSpaceShared instance = newSchedulerWithRunningCloudlets(mips, numberOfVmPes, numberOfCloudlets, numberOfCloudletPes);
        final double expected = 0.666;
        assertEquals(expected, instance.getRequestedCpuPercentUtilization(0), 0.001);
    }
@ Test public void testGetTotalUtilizationOfCpu_DualPesCloudlets_NotEnoughVmPes ( ) { final long mips = 1000 ; final int numberOfVmPes = 3 ; final int numberOfCloudlets = 3 ; final int numberOfCloudletPes = 2 ; final CloudletSchedulerSpaceShared instance = newSchedulerWithRunningCloudlets ( mips , numberOfVmPes , numberOfCloudlets , numberOfCloudletPes ) ; final double expected = 0.666 ; assertEquals ( expected , instance . getRequestedCpuPercentUtilization ( 0 ) , 0.001 ) ; }
Submits 3 cloudlets that require 2 PEs each one, totalling 6 required PES.
Submits 3 cloudlets that require 2 PEs each one totalling 6 required PES .