Commit 83b5dc50 authored by Rafael Vieira Falcão's avatar Rafael Vieira Falcão
Browse files

Merge branch 'development' into info-aware-simulation

parents 9d9c5d63 e14d9e54
......@@ -38,7 +38,7 @@ import org.cloudbus.cloudsim.hosts.Host;
import org.cloudbus.cloudsim.hosts.HostSimple;
import org.cloudbus.cloudsim.power.models.PowerModel;
import org.cloudbus.cloudsim.power.models.PowerModelLinear;
import org.cloudbus.cloudsim.power.models.PowerModelSpecPowerHpProLiantBL460cGen9LowPowerMode;
import org.cloudbus.cloudsim.power.models.PowerModelSpecPowerLowPowerMode;
import org.cloudbus.cloudsim.provisioners.PeProvisionerSimple;
import org.cloudbus.cloudsim.provisioners.ResourceProvisioner;
import org.cloudbus.cloudsim.provisioners.ResourceProvisionerSimple;
......@@ -86,7 +86,7 @@ import org.cloudsimplus.builders.tables.CloudletsTableBuilder;
* @author Manoel Campos da Silva Filho
* @since CloudSim Plus 1.2.4
*/
public class PowerExampleHpProLiantBL460cGen9 {
public class PowerExampleAutonomic {
/**
* Defines, between other things, the time intervals to keep Hosts CPU
* utilization history records.
......@@ -118,10 +118,10 @@ public class PowerExampleHpProLiantBL460cGen9 {
private final List<Host> hostList;
public static void main(String[] args) {
new PowerExampleHpProLiantBL460cGen9();
new PowerExampleAutonomic();
}
public PowerExampleHpProLiantBL460cGen9() {
public PowerExampleAutonomic() {
simulation = new CloudSim();
hostList = new ArrayList<>(HOSTS);
datacenter0 = createDatacenterSimple();
......@@ -205,9 +205,9 @@ public class PowerExampleHpProLiantBL460cGen9 {
peList.add(new PeSimple(1000, new PeProvisionerSimple()));
}
// final PowerModel powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9DvfsMode();
// final PowerModel powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9HighPowerMode();
final PowerModel powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9LowPowerMode();
// final PowerModel powerModel = new PowerModelSpecPowerDvfsMode();
// final PowerModel powerModel = new PowerModelSpecPowerHighPowerMode();
final PowerModel powerModel = new PowerModelSpecPowerLowPowerMode();
final long ram = 2048; // in Megabytes
final long bw = 10000; // in Megabits/s
......
......@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models;
/**
* The power model of an HP ProLiant BL460c Gen9 (1 x [Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on DVFS Mode.<br/>
* The power model of a machine with (1 x [Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on DVFS Mode.<br/>
* <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html">
* https://www.spec.org/cpu2006/results/res2016q2/cpu2006-20160419-40548.pdf</a>
*
......@@ -26,7 +26,7 @@ package org.cloudbus.cloudsim.power.models;
* @author José Benardi de Souza Nunes
* @since CloudSim Toolkit 3.0
*/
public class PowerModelSpecPowerHpProLiantBL460cGen9DvfsMode extends PowerModelSpecPower {
public class PowerModelSpecPowerDvfsMode extends PowerModelSpecPower {
private final double[] power = { 45.0, 65.0, 75.0, 80, 85, 88.33333333333333, 90, 95.0, 95, 96.66666666666667, 100 };
......
......@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models;
/**
* The power model of an HP ProLiant BL460c Gen9 (1 x [Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on High Power Mode.<br/>
* The power model of a machine with ([Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on High Power Mode.<br/>
* <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html">
* https://www.spec.org/cpu2006/results/res2016q2/cpu2006-20160419-40548.pdf</a>
*
......@@ -26,7 +26,7 @@ package org.cloudbus.cloudsim.power.models;
* @author José Benardi de Souza Nunes
* @since CloudSim Toolkit 3.0
*/
public class PowerModelSpecPowerHpProLiantBL460cGen9HighPowerMode extends PowerModelSpecPower {
public class PowerModelSpecPowerHighPowerMode extends PowerModelSpecPower {
private final double[] power = { 45.0, 65.0, 75.0, 80, 85, 88.33333333333333, 90, 95.0, 95, 96.66666666666667, 100 };
......
......@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models;
/**
* The power model of an HP ProLiant BL460c Gen9 (1 x [Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on Low Power Mode.<br/>
* The power model of a machine with (1 x [Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz, 6 cores], 16GB) on Low Power Mode.<br/>
* <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html">
* https://www.spec.org/cpu2006/results/res2016q2/cpu2006-20160419-40548.pdf</a>
*
......@@ -26,7 +26,7 @@ package org.cloudbus.cloudsim.power.models;
* @author José Benardi de Souza Nunes
* @since CloudSim Toolkit 3.0
*/
public class PowerModelSpecPowerHpProLiantBL460cGen9LowPowerMode extends PowerModelSpecPower {
public class PowerModelSpecPowerLowPowerMode extends PowerModelSpecPower {
private final double[] power = { 45, 51.666666666666664, 56.666666666666664,
58.333333333333336, 60.0, 60.0, 61.666666666666664, 65, 65, 65, 65};
......
......@@ -5,12 +5,12 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class PowerModelSpecPowerHpProLiantBL460cGen9HighPowerModeTest {
public class PowerModelSpecPowerDvfsModeTest {
private PowerModel powerModel;
@Before
public void setUp() throws Exception {
powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9HighPowerMode();
powerModel = new PowerModelSpecPowerDvfsMode();
powerModel.setHost(PowerModelTest.createHostWithOneVm());
}
......@@ -27,12 +27,20 @@ public class PowerModelSpecPowerHpProLiantBL460cGen9HighPowerModeTest {
@Test
public void testGetPower() {
assertEquals(45, powerModel.getPower(0), 0);
assertEquals(49, powerModel.getPower(0.02), 0);
assertEquals(65, powerModel.getPower(0.1), 0);
assertEquals(65.0, powerModel.getPower(0.1), 0);
assertEquals(75.0, powerModel.getPower(0.2), 0);
assertEquals(80, powerModel.getPower(0.3), 0);
assertEquals(85, powerModel.getPower(0.4), 0);
assertEquals(88.33333333333333, powerModel.getPower(0.5), 0);
assertEquals(95, powerModel.getPower(0.8), 0);
assertEquals(96.16666666666667, powerModel.getPower(0.87), 0);
assertEquals(90, powerModel.getPower(0.6), 0);
assertEquals(95.0, powerModel.getPower(0.7), 0);
assertEquals(95.0, powerModel.getPower(0.8), 95.0);
assertEquals(96.66666666666667, powerModel.getPower(0.9), 0);
assertEquals(100, powerModel.getPower(1), 0);
assertEquals(49, powerModel.getPower(0.02), 0);
assertEquals(96.16666666666667, powerModel.getPower(0.87), 0);
}
}
......@@ -5,12 +5,12 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class PowerModelSpecPowerHpProLiantBL460cGen9DvfsModeTest {
public class PowerModelSpecPowerHighPowerModeTest {
private PowerModel powerModel;
@Before
public void setUp() throws Exception {
powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9DvfsMode();
powerModel = new PowerModelSpecPowerHighPowerMode();
powerModel.setHost(PowerModelTest.createHostWithOneVm());
}
......@@ -27,12 +27,18 @@ public class PowerModelSpecPowerHpProLiantBL460cGen9DvfsModeTest {
@Test
public void testGetPower() {
assertEquals(45, powerModel.getPower(0), 0);
assertEquals(49, powerModel.getPower(0.02), 0);
assertEquals(65, powerModel.getPower(0.1), 0);
assertEquals(65.0, powerModel.getPower(0.1), 0);
assertEquals(75.0, powerModel.getPower(0.2), 0);
assertEquals(80, powerModel.getPower(0.3), 0);
assertEquals(85, powerModel.getPower(0.4), 0);
assertEquals(88.33333333333333, powerModel.getPower(0.5), 0);
assertEquals(95, powerModel.getPower(0.8), 0);
assertEquals(96.16666666666667, powerModel.getPower(0.87), 0);
assertEquals(90, powerModel.getPower(0.6), 0);
assertEquals(95.0, powerModel.getPower(0.7), 0);
assertEquals(95.0, powerModel.getPower(0.8), 95.0);
assertEquals(96.66666666666667, powerModel.getPower(0.9), 0);
assertEquals(100, powerModel.getPower(1), 0);
assertEquals(49, powerModel.getPower(0.02), 0);
assertEquals(96.16666666666667, powerModel.getPower(0.87), 0);
}
}
......@@ -5,12 +5,12 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class PowerModelSpecPowerHpProLiantBL460cGen9LowPowerModeTest {
public class PowerModelSpecPowerLowPowerModeTest {
private PowerModel powerModel;
@Before
public void setUp() throws Exception {
powerModel = new PowerModelSpecPowerHpProLiantBL460cGen9LowPowerMode();
powerModel = new PowerModelSpecPowerLowPowerMode();
powerModel.setHost(PowerModelTest.createHostWithOneVm());
}
......@@ -27,12 +27,18 @@ public class PowerModelSpecPowerHpProLiantBL460cGen9LowPowerModeTest {
@Test
public void testGetPower() {
assertEquals(45, powerModel.getPower(0), 0);
assertEquals(46.33333333333333336, powerModel.getPower(0.02), 0);
assertEquals(51.666666666666664, powerModel.getPower(0.1), 0);
assertEquals(60, powerModel.getPower(0.5), 0);
assertEquals(56.666666666666664, powerModel.getPower(0.2), 0);
assertEquals(58.333333333333336, powerModel.getPower(0.3), 0);
assertEquals(60.0, powerModel.getPower(0.4), 0);
assertEquals(60.0, powerModel.getPower(0.5), 0);
assertEquals(61.666666666666664, powerModel.getPower(0.6), 0);
assertEquals(65, powerModel.getPower(0.7), 0);
assertEquals(65, powerModel.getPower(0.8), 0);
assertEquals(65, powerModel.getPower(0.87), 0);
assertEquals(65, powerModel.getPower(0.9), 0);
assertEquals(65, powerModel.getPower(1), 0);
}
assertEquals(46.33333333333333336, powerModel.getPower(0.02), 0);
assertEquals(65, powerModel.getPower(0.87), 0);
}
}
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