Commit Graph
6 Commits
Author SHA1 Message Date
DanielandGitHub aa8b8a2ba9 Merge 845ba8d6e8 into d036061e3f 2026-06-20 21:05:26 +00:00
Daniel-dev22andClaude Opus 4.8 845ba8d6e8 test: drop test_timestamps_are_memory_bounded
It only asserted that deque(maxlen=) caps length, which is stdlib behavior
rather than something this change needs to verify.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 17:05:23 -04:00
Daniel-dev22andClaude Opus 4.8 bf3190a6d7 perf(util): use monotonic clock and bounded deque in EventsPerSecond
EventsPerSecond is updated on every captured frame, every detection and
every processed frame across all cameras and detectors. The previous
implementation derived timestamps from datetime.now().timestamp() (wall
clock), so an NTP or manual clock adjustment could skew the rolling-window
expiry; it also stored timestamps in a list and expired them with
del self._timestamps[0] (O(n) per removal) plus a periodic slice-copy to
cap growth.

Switch to time.monotonic() for the interval math (correct by construction
and immune to wall-clock jumps) and a collections.deque(maxlen=...) so
expiry is O(1) (popleft) and retention is bounded automatically. This
mirrors the deque-based expiry already used in video/ffmpeg.py and
watchdog.py. Observable output is unchanged.

Adds frigate/test/test_builtin.py covering rate calculation, window
expiry and the memory bound.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 09:17:50 -04:00
DanielandNicolas Mowen d93d6262ce Use 127.0.0.1 for chroma (#12135) 2024-08-29 20:19:50 -06:00
DanielandGitHub 7e5eb82882 Delete download-models (#10755) 2024-03-30 13:23:32 -06:00
DanielandGitHub cc6e049966 Change multiselect camera icon (#8016)
* CenterFocusString icon

* Add CenterFocusString to multiselect

* Rename CenterFocusString.jsx

* Rename icon and make it smaller

* Rename icon

* Fix lint and use icon
for speech

* remove unused vars

* Remove unused import
2023-10-08 14:30:53 -05:00