perun.data_model.data¶
Storage Module.
Attributes¶
Classes¶
DataNode type enum. |
|
Metric Type enum. |
|
Types of data aggregation. |
|
Struct with resulting metrics and the metadata. |
|
Collects statistics based on multiple metrics of the same type. |
|
Contains timesteps and recorded values from sensors, including information on the values. |
|
Stores local region data while an application is being monitored. |
|
Stores region data from all MPI ranks. |
|
Recursive data structure that contains all the information of a monitored application. |
Module Contents¶
- class perun.data_model.data.NodeType(*args, **kwds)[source]¶
Bases:
enum.EnumDataNode type enum.
- APP¶
- MULTI_RUN¶
- RUN¶
- NODE¶
- DEVICE_GROUP¶
- SENSOR¶
- class perun.data_model.data.MetricType[source]¶
Bases:
str,enum.EnumMetric Type enum.
- RUNTIME = 'runtime'¶
- POWER = 'power'¶
- CPU_POWER = 'cpu_power'¶
- GPU_POWER = 'gpu_power'¶
- DRAM_POWER = 'dram_power'¶
- OTHER_POWER = 'other_power'¶
- CPU_UTIL = 'cpu_util'¶
- GPU_UTIL = 'gpu_util'¶
- OTHER_UTIL = 'other_util'¶
- DRAM_MEM = 'dram_mem'¶
- GPU_MEM = 'gpu_mem'¶
- NET_READ = 'net_read'¶
- NET_WRITE = 'net_write'¶
- DISK_READ = 'disk_read'¶
- DISK_WRITE = 'disk_write'¶
- ENERGY = 'energy'¶
- CPU_ENERGY = 'cpu_energy'¶
- GPU_ENERGY = 'gpu_energy'¶
- DRAM_ENERGY = 'dram_energy'¶
- OTHER_ENERGY = 'other_energy'¶
- OTHER_MEM = 'other_memory'¶
- CPU_CLOCK = 'cpu_clock'¶
- GPU_CLOCK = 'gpu_clock'¶
- N_RUNS = 'n_runs'¶
- MONEY = 'money'¶
- CO2 = 'co2'¶
- fromString(value: str) MetricType[source]¶
Create MetricType from string.
- Parameters:
value (str) – MetricType value.
- Returns:
MetricType object.
- Return type:
- class perun.data_model.data.AggregateType[source]¶
Bases:
str,enum.EnumTypes of data aggregation.
- SUM = 'sum'¶
- MEAN = 'mean'¶
- MAX = 'max'¶
- MIN = 'min'¶
- class perun.data_model.data.Metric[source]¶
Struct with resulting metrics and the metadata.
- type: MetricType¶
- value: perun.data_model.measurement_type.Number¶
- agg: AggregateType¶
- class perun.data_model.data.Stats[source]¶
Collects statistics based on multiple metrics of the same type.
- type: MetricType¶
- sum: perun.data_model.measurement_type.Number¶
- mean: perun.data_model.measurement_type.Number¶
- std: perun.data_model.measurement_type.Number¶
- max: perun.data_model.measurement_type.Number¶
- min: perun.data_model.measurement_type.Number¶
- classmethod fromMetrics(metrics: List[Metric]) Stats[source]¶
Create stats object from list of metrics with the same type.
- property value: perun.data_model.measurement_type.Number¶
Value property (mean).
For compatibility with Metric dataclass.
- Returns:
Return the mean value of the stats object.
- Return type:
Number
- class perun.data_model.data.RawData[source]¶
Contains timesteps and recorded values from sensors, including information on the values.
- timesteps: numpy.ndarray[Any, numpy.dtype[numpy.floating]]¶
- values: numpy.ndarray[Any, numpy.dtype[numpy.integer | numpy.floating]]¶
- alt_values: numpy.ndarray | None = None¶
- alt_v_md: perun.data_model.measurement_type.MetricMetaData | None = None¶
- class perun.data_model.data.LocalRegions[source]¶
Stores local region data while an application is being monitored.
- class perun.data_model.data.Region[source]¶
Stores region data from all MPI ranks.
For each marked region (decorated function), an numpy array with timestamps indicating function starts and ends.
- id: str = ''¶
- raw_data: Dict[int, numpy.ndarray[Any, numpy.dtype[numpy.floating]]]¶
- metrics: Dict[MetricType, Stats]¶
- processed: bool = False¶
- class perun.data_model.data.DataNode(id: str, type: NodeType, metadata: Dict = {}, nodes: Dict[str, Any] | None = None, metrics: Dict[MetricType, Metric | Stats] | None = None, deviceType: perun.data_model.sensor.DeviceType | None = None, raw_data: RawData | None = None, regions: Dict[str, Region] | None = None, processed: bool = False)[source]¶
Recursive data structure that contains all the information of a monitored application.
- id¶
- type¶
- metadata: Dict[str, Any]¶
- nodes: Dict[str, Any]¶
- metrics: Dict[MetricType, Metric | Stats]¶
- deviceType: perun.data_model.sensor.DeviceType | None = None¶
- processed = False¶
- addRegionData(localRegions: List[LocalRegions], start_time: int) None[source]¶
Add region information to to data node.
- Parameters:
localRegions (List[LocalRegions]) – Gathered local regions from all MPI ranks
start_time (int) – ‘Official’ start time of the run.