mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
2add675d42
* test refactor process stats * Update util.py * bugfix * black formatting * add missing processes field to StatsTrackingTypes class * fix python checks and tests... * use psutil for calcilate cpu utilization on get_cpu_stats * black...black...black... * add cpu average * calculate statiscts for logger process * add P-ID for other processes in System.jsx * Apply suggestions from code review Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * make page beautiful again :) --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
from typing import Optional, TypedDict
|
|
from multiprocessing.queues import Queue
|
|
from multiprocessing.sharedctypes import Synchronized
|
|
from multiprocessing.context import Process
|
|
|
|
from frigate.object_detection import ObjectDetectProcess
|
|
|
|
|
|
class CameraMetricsTypes(TypedDict):
|
|
camera_fps: Synchronized
|
|
capture_process: Optional[Process]
|
|
detection_enabled: Synchronized
|
|
detection_fps: Synchronized
|
|
detection_frame: Synchronized
|
|
ffmpeg_pid: Synchronized
|
|
frame_queue: Queue
|
|
motion_enabled: Synchronized
|
|
improve_contrast_enabled: Synchronized
|
|
motion_threshold: Synchronized
|
|
motion_contour_area: Synchronized
|
|
process: Optional[Process]
|
|
process_fps: Synchronized
|
|
read_start: Synchronized
|
|
skipped_fps: Synchronized
|
|
|
|
|
|
class RecordMetricsTypes(TypedDict):
|
|
record_enabled: Synchronized
|
|
|
|
|
|
class StatsTrackingTypes(TypedDict):
|
|
camera_metrics: dict[str, CameraMetricsTypes]
|
|
detectors: dict[str, ObjectDetectProcess]
|
|
started: int
|
|
latest_frigate_version: str
|
|
last_updated: int
|
|
processes: dict[str, int]
|