epicsarchiver.statistics.models.pv_details
Handles the PVDetails report per PV from the Archiver.
Classes
Enum of detail types present in the archiver per PV. |
|
Representation of the response from the pvDetails endpoint in archiver. |
Functions
|
Module Contents
- class epicsarchiver.statistics.models.pv_details.DetailEnum[source]
-
Enum of detail types present in the archiver per PV.
- LostEventsTimestamp = 'How many events lost because the timestamp is in the far future or past so far?'[source]
- LostEventsType = 'How many events lost because the DBR_Type of the PV has changed from what it used to be?'[source]
- classmethod from_str(desc: str) DetailEnum | None[source]
Convert from a string to DetailEnum.
- Parameters:
desc (str) – input string
- Returns:
An enum representation.
- Return type:
DetailEnum | None
- epicsarchiver.statistics.models.pv_details._dropped_pv_response(pv_name: str, value: str, reason: epicsarchiver.statistics.models.stat_responses.DroppedReason, stat: epicsarchiver.statistics.models.stats.Stat) tuple[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.DroppedPVResponse] | None[source]
- class epicsarchiver.statistics.models.pv_details.Details[source]
Bases:
Dict[DetailEnum,str]Representation of the response from the pvDetails endpoint in archiver.
- classmethod from_json(json: list[dict[str, str]]) Details[source]
Convert from the json representation at the Archiver Endpoint.
Takes some of the details which are relevant for reports to create Details.
- to_base_responses(mb_per_day_min: float = 0) dict[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.BaseStatResponse][source]
Convert to a BaseStatResponse dict to match Generic Archiver Statistics.
- Parameters:
mb_per_day_min (float) – Minimum MB per day to filter by
- Returns:
Stat to BaseStatResponse output
- Return type:
- detail_to_base_response(detail_enum: DetailEnum, value: str, mb_per_day_min: float = 0) tuple[epicsarchiver.statistics.models.stats.Stat, epicsarchiver.statistics.models.stat_responses.BaseStatResponse] | None[source]
Convert a single detail to a Stat and BaseStatResponse.
- Parameters:
detail_enum (DetailEnum) – Detail
value (str) – String value of the detail
mb_per_day_min (float) – Minimum MB per day to filter by
- Returns:
Output
- Return type:
tuple[Stat, BaseStatResponse] | None