UtilizationHistory

public interface UtilizationHistory

Stores resource utilization data for a specific Machine.

Author:Anton Beloglazov, Manoel Campos da Silva Filho

Fields

NULL

UtilizationHistory NULL

An attribute that implements the Null Object Design Pattern for UtilizationHistory objects.

Methods

addUtilizationHistory

void addUtilizationHistory(double time)

Adds a CPU utilization percentage history value related to the current simulation time, to the beginning of the History List. The value is added only if the utilization history .

Parameters:
  • time – the current simulation time

cpuUsageFromHostCapacity

double cpuUsageFromHostCapacity(double time)

Computes the percentage of the CPU the VM is using, relative the Host’s total MIPS CAPACITY. If the capacity is 1000 MIPS and the VM is using 250 MIPS, it’s equivalent to 25% of the Host’s capacity

Parameters:
  • time – the time to get the VM CPU utilization
Returns:

the relative VM CPU usage percent (from 0 to 1)

disable

void disable()

Disables the history to avoid utilization data to be added to it. That allows to reduce memory usage since no utilization data will be collected.

enable

void enable()

Enables the history so that utilization data can be added to it.

getHistory

SortedMap<Double, Double> getHistory()

Gets a read-only CPU utilization percentage history map where each key is the time the utilization was collected and each value is the utilization percentage (between [0 and 1]). There will be at least one entry for each time multiple of the Datacenter.getSchedulingInterval(). This way, it’s required to set a Datacenter scheduling interval with the desired value.

getMaxHistoryEntries

int getMaxHistoryEntries()

Gets the maximum number of entries to store in the history.

getUtilizationMad

double getUtilizationMad()

Gets the utilization Median Absolute Deviation (MAD) in MIPS.

getUtilizationMean

double getUtilizationMean()

Gets the utilization mean in MIPS.

getUtilizationVariance

double getUtilizationVariance()

Gets the utilization variance in MIPS.

Returns:the utilization variance in MIPS

getVm

Vm getVm()

isEnabled

boolean isEnabled()

Checks if the object is enabled to add data to the history.

powerConsumption

double powerConsumption(double time)

Computes the amount of power the VM is using, relative to the total Host’s power consumption (in watt-sec).

Parameters:
  • time – the time to get the VM power consumption
Returns:

the relative VM power consumption in watt-sec

setMaxHistoryEntries

void setMaxHistoryEntries(int maxHistoryEntries)

Sets the maximum number of entries to store in the history.

Parameters:
  • maxHistoryEntries – the value to set