DSP Model
Module for providing the model data classes for DSP.
- class ska_pst_lmc.dsp.dsp_model.DspDiskSubbandMonitorData(disk_capacity: int, available_disk_space: int, data_recorded: int, data_record_rate: float)[source]
A data class to represent a subband monitoring data record.
This class is used to report on a subband specific monitoring data. Each subband will report on the disk capacity and availabile bytes to help with the calculation of available recording time left for the whole beam.
- Variables
disk_capacity (int) – total amount of bytes for the disk used for DSP processing for the beam.
available_disk_space (int) – total currently available bytes of the disk used.
data_recorded (int) – amount of bytes written by the subband in current scan.
data_record_rate (float) – current rate of writing of data to disk for subband.
- class ska_pst_lmc.dsp.dsp_model.DspDiskMonitorData(disk_capacity: int = 9223372036854775807, available_disk_space: int = 9223372036854775807, data_recorded: int = 0, data_record_rate: float = 0.0, available_recording_time: float = 31536000.0, subband_data_recorded: ~typing.List[int] = <factory>, subband_data_record_rate: ~typing.List[float] = <factory>)[source]
A data class to represent the DSP monitoring across all subbands.
This class is used to model the combined subband data for the DSP. Which includes the disk usage and monitoring as well as the current throughput of data.
- Variables
disk_capacity (int) – size, in bytes, for the disk for DSP processing for this beam.
available_disk_space (int) – currently available bytes of the disk.
data_recorded (int) – total amount of bytes written in current scan across all subbands of the beam.
data_record_rate (float) – total rate of writing to disk across all subbands, in bytes/second.
available_recording_time (float) – estimated available recording time left for current scan.
subband_data_recorded (List[int]) – a list of bytes written, one record per subband.
subband_data_record_rate (List[float]) – a list of current rate of writing per subband, in bytes/seconds.
- class ska_pst_lmc.dsp.dsp_model.DspDiskMonitorDataStore[source]
Data store used to aggregate the subband data for DSP.
Initialise data monitor store.
- update_disk_stats(disk_capacity: int, available_disk_space: Optional[int] = None, disk_available_bytes: Optional[int] = None, **kwargs: Any) None [source]
Update disk statistics.
The available_disk_space and disk_available_bytes parameters are the same property but both are provided to work around an issue that coming from DSP
- property monitor_data: DspDiskMonitorData
Get current monitoring data for DSP.
This returns the latest monitoring data calculated from the current subband data. If no subband data is available then the response is a default
DspDiskMonitorData
object.