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

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.

setMaxHistoryEntries

void setMaxHistoryEntries(int maxHistoryEntries)

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

Parameters:
  • maxHistoryEntries – the value to set