public class BasicProbeTests extends Object
org.palladiosimulator.probeframework.probes.example package.| Constructor and Description |
|---|
BasicProbeTests() |
| Modifier and Type | Method and Description |
|---|---|
void |
setUp()
Initializes the simulation context.
|
void |
testCPUStateProbe()
Test case for the
ExampleTakeCPUStateProbe that takes the dimensionless current
number of jobs within an active resource, which is in this case a CPU (i.e., it measures a
CPU state metric). |
void |
testCurrentTimeProbe()
Test case for the
ExampleTakeCurrentTimeProbe that takes the current simulation time
of a simulation in seconds (i.e., it measures a point in time metric). |
void |
testDemandProbe()
Test case for the
ExampleTakeCPUDemandProbe that takes the demand emitted from an
active resource (event source), which is in this case a CPU (i.e., it measures a resource
demand metric). |
public void setUp()
public void testCurrentTimeProbe()
ExampleTakeCurrentTimeProbe that takes the current simulation time
of a simulation in seconds (i.e., it measures a point in time metric). The test lets the
simulation run for 100 seconds and then probes.public void testCPUStateProbe()
ExampleTakeCPUStateProbe that takes the dimensionless current
number of jobs within an active resource, which is in this case a CPU (i.e., it measures a
CPU state metric). The test creates a test CPU, adds 2 jobs to its scheduler, and then
probes.public void testDemandProbe()
ExampleTakeCPUDemandProbe that takes the demand emitted from an
active resource (event source), which is in this case a CPU (i.e., it measures a resource
demand metric). The test creates a test CPU and adds a job to its scheduler that demands 10
seconds of CPU. The probe is registered to react on this demand event and stores the received
probe measurement in the lastMeasurement member variable.