experiment_impact_tracker.cpu package¶
Submodules¶
experiment_impact_tracker.cpu.common module¶
-
experiment_impact_tracker.cpu.common.assert_cpus_by_attributes(attributes_set)¶ Assert that you’re running on CPUs with a certain set of attributes.
This helps when running jobs in a cluster setting with heterogeneous CPUs to filter out sets of CPUs that you’d rather avoid. Example attributes:
- {
“brand”: “Intel(R) Xeon(R) CPU E5-2640 v3 @ 2.60GHz”, “hz_advertised”: “2.6000 GHz”
}
- Parameters
attributes_set (dict) – set of attribute key pairs
- Raises
CPUAttributeAssertionError on encountered asserted attribute mismatch –
-
experiment_impact_tracker.cpu.common.get_cpu_count_adjusted_load_avg(*args, **kwargs)¶
-
experiment_impact_tracker.cpu.common.get_cpu_freq(*args, **kwargs)¶ Returns all cpu freq of all cpu’s available
-
experiment_impact_tracker.cpu.common.get_hz_actual(*args, **kwargs)¶ Gets the current effective Hz of the CPU
- Returns
Hz
- Return type
str
-
experiment_impact_tracker.cpu.common.get_my_cpu_info()¶ Gather current cpu hardware info for this machine.
- Returns
info about cpu
- Return type
dict
experiment_impact_tracker.cpu.exceptions module¶
-
exception
experiment_impact_tracker.cpu.exceptions.CPUAttributeAssertionError¶ Bases:
ExceptionAn exception that occurs when try to assert a certain CPU attribute and a different one is encountered.
experiment_impact_tracker.cpu.intel module¶
-
experiment_impact_tracker.cpu.intel.get_and_cache_cpu_max_tdp_from_intel()¶ Goes to Intel’s website and pulls information about TDP.
-
experiment_impact_tracker.cpu.intel.get_rapl_power(pid_list, logger=None, **kwargs)¶ Gather’s CPU information from RAPL.
- Parameters
pid_list ([int]) – List of process ID’s to attribute power to.
logger (optional) – Logger to use when logging information. Defaults to None.
- Raises
NotImplementedError – If an unexpected top-level domain is encountered in RAPL information.
ValueError – If no memory is used by the processes. This seems highly unlikely if not impossible and is probably a bug.
ValueError – If RAPL power estimates are coming back 0. This is unlikely if not impossible so is probably an error.
- Returns
Information about CPU
- Return type
dict
experiment_impact_tracker.cpu.rapl module¶
-
class
experiment_impact_tracker.cpu.rapl.RAPLDifference¶ Bases:
experiment_impact_tracker.cpu.rapl.RAPLSample-
average_power(package, domain=None)¶
-