manafa.parsing.powerProfile package

Submodules

manafa.parsing.powerProfile.PowerProfile module

class manafa.parsing.powerProfile.PowerProfile.PowerProfile(filename)[source]

Bases: object

Stores information regarding devices’ power profile xml file.

Stores information about the file and each pair component, current contained in the file. .. attribute:: filename

path of power profile file.

type

str

add_component(component)[source]

adds component to current state. :param component: component info. :type component: dict

get_CPU_core_speed_pair(core_id, core_freq)[source]

retrieves a pair with the before and after closest frequency values for a core identified by core_id at a given frequency.

Power profile file stores current values measured at specific fixed frequencies. Many times, a given core is running at a frequency different from the ones recorded in file. In order to estimate the current consumption at core_freq, there is need to interpolate the closest recorded values.

Parameters
  • core_id – core id.

  • core_freq – core frequency.

Returns

before value. snd_pair: after value.

Return type

fst_pair

get_CPU_state_current(state)[source]

retrieves the current consumed by cpu at a given state. :param state: given state.

Returns

the current being consumed.

Return type

current

static merge_two_dicts(self: object, x: object, y: object)object[source]

Module contents