mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-25 14:57:07 +03:00
Pull count of detection events by label into prometheus metrics (#20119)
* pull count of detection events by label into prometheus metrics * format changes with ruff * remove unneeded f-string * fix imports format --------- Co-authored-by: iesad <iesad>
This commit is contained in:
@@ -261,12 +261,19 @@ class TestHttp(unittest.TestCase):
|
||||
assert Recordings.get(Recordings.id == rec_k3_id)
|
||||
|
||||
|
||||
def _insert_mock_event(id: str, start: int, end: int, retain: bool) -> Event:
|
||||
def _insert_mock_event(
|
||||
id: str,
|
||||
start: int,
|
||||
end: int,
|
||||
retain: bool,
|
||||
camera: str = "front_door",
|
||||
label: str = "Mock",
|
||||
) -> Event:
|
||||
"""Inserts a basic event model with a given id."""
|
||||
return Event.insert(
|
||||
id=id,
|
||||
label="Mock",
|
||||
camera="front_door",
|
||||
label=label,
|
||||
camera=camera,
|
||||
start_time=start,
|
||||
end_time=end,
|
||||
top_score=100,
|
||||
|
||||
Reference in New Issue
Block a user