Interface PowerModel

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static PowerModel NULL
      A property that implements the Null Object Design Pattern for Host objects.
    • Method Summary

      Modifier and Type Method Description
      double getEnergyLinearInterpolation​(double fromUtilization, double toUtilization, double time)
      Gets an estimation of energy consumption using linear interpolation of the utilization change.
      Host getHost()  
      double getMaxPower()
      Gets the max power that can be consumed by the host in Watt-Second (Ws).
      double getPower​(double utilization)
      Gets power consumption in Watt-Second (Ws) of the Power Model, according to the utilization percentage of a critical resource, such as CPU.
      void setHost​(Host host)  
    • Field Detail

      • NULL

        static final PowerModel NULL
        A property that implements the Null Object Design Pattern for Host objects.
    • Method Detail

      • getHost

        Host getHost()
      • setHost

        void setHost​(Host host)
      • getMaxPower

        double getMaxPower()
        Gets the max power that can be consumed by the host in Watt-Second (Ws).
        Returns:
        the max consumption power in Watt-Second (Ws)
      • getPower

        double getPower​(double utilization)
                 throws java.lang.IllegalArgumentException
        Gets power consumption in Watt-Second (Ws) of the Power Model, according to the utilization percentage of a critical resource, such as CPU.

        The power consumption data is just available while the host is active.

        Parameters:
        utilization - the utilization percentage (between [0 and 1]) of a resource that is critical for power consumption.
        Returns:
        the power consumption in Watt-Second (Ws)
        Throws:
        java.lang.IllegalArgumentException - when the utilization percentage is not between [0 and 1]
      • getEnergyLinearInterpolation

        double getEnergyLinearInterpolation​(double fromUtilization,
                                            double toUtilization,
                                            double time)
        Gets an estimation of energy consumption using linear interpolation of the utilization change. It's required to set a PowerModel in order to get power usage data.
        Parameters:
        fromUtilization - the initial utilization percentage
        toUtilization - the final utilization percentage
        time - the time span between the initial and final utilization to compute the energy consumption
        Returns:
        the estimated energy consumption