Commit Graph
3421 Commits
Author SHA1 Message Date
J. Nick Koston 8f49aab070 Merge branch 'scheduler-cancel-fast-path' into integration 2026-04-02 12:23:15 -10:00
J. Nick Koston 4535b82483 [scheduler] Remove redundant Defer_UniqueID, keep anonymous + same-ID
UniqueID benchmark was unrealistic — unique IDs still ran
cancel_item_locked_ scanning all containers for matches that never
exist. Replace with just two meaningful defer variants:
- Defer: anonymous (nullptr name, skips cancel entirely)
- Defer_SameID: fixed ID (cancel-and-replace coalescing pattern)
2026-04-02 11:51:52 -10:00
J. Nick Koston ed14694e46 [scheduler] Add defer benchmark variants and fix anonymous defer path
- Scheduler_Defer: use nullptr name matching Component::defer(func)
  production pattern (skips cancel_item_locked_ entirely)
- Scheduler_Defer_SameID: fixed ID 0 measuring cancel-and-replace
  pattern for coalescing rapid updates
- Scheduler_Defer_UniqueID: unique IDs measuring cancel scan overhead
  when no match is found
2026-04-02 11:45:03 -10:00
J. Nick Koston ce5c36a02a [scheduler] Fix pool imbalance in benchmarks, add static_assert
Change kInnerIterations from 2000 to 2100 (divisible by batch sizes 3
and 10) to prevent pool imbalance at iteration boundaries that caused
spurious malloc. Add static_assert to each benchmark to catch this at
compile time.
2026-04-02 11:38:18 -10:00
J. Nick Koston 904577bf91 [scheduler] Extract warm_pool helper for scheduler benchmarks
Replace duplicated pool warmup blocks with a shared warm_pool() helper
that registers and replaces items twice to populate the recycling pool
before the benchmark loop begins.
2026-04-02 11:31:27 -10:00
J. Nick Koston 279686b1c2 [scheduler] Add ExceedPool benchmark to measure pool overflow cliff
Add Scheduler_SetTimeout_ExceedPool with batch size 10 (exceeding
MAX_POOL_SIZE=5) to measure the performance impact when the recycling
pool is exhausted and items must be malloc'd/freed each cycle.
2026-04-02 11:26:28 -10:00
J. Nick Koston 615b2b339a [scheduler] Batch 3 registrations per call() for realistic worst case
Instead of draining after every single registration or batching 5,
use a batch size of 3 which represents a realistic worst case where
multiple components schedule in the same loop iteration while staying
within the recycling pool (MAX_POOL_SIZE=5).
2026-04-02 11:24:53 -10:00
J. Nick Koston 347f981768 [scheduler] Fix unrealistic scheduler benchmarks missing periodic drain
Scheduler registration benchmarks (SetTimeout, SetInterval, Defer) were
not calling scheduler.call() periodically to drain and clean up cancelled
items. In production, call() runs every loop iteration, keeping the
scheduler containers small. Without draining, cancelled items accumulated
causing O(n²) scan cost in cancel_item_locked_ that doesn't reflect
real-world behavior.

- SetTimeout: was only calling process_to_add() (no cleanup), now calls
  call() every kKeyCount iterations
- SetInterval: was calling process_to_add() (no cleanup of items_), now
  calls call() for proper cleanup
- Defer: was never draining the defer queue, now calls call() to process
  deferred items as production does
- All three now advance time (++now) to match production loop behavior
2026-04-02 11:18:17 -10:00
J. Nick Koston 67238e3d74 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	tests/components/time/posix_tz_parser.cpp
2026-04-02 10:13:20 -10:00
c82166e5f3 [dsmr] Allow setting MBUS id for thermal sensors in DSMR component (#7519)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
2026-04-02 10:06:49 -10:00
Jonathan Swoboda 37b33f62de [htu21d] Fix set_heater action reading wrong config key (#15378) 2026-04-02 09:25:54 -10:00
J. Nick Koston da09e1e1ce [time] Use O(1) closed-form leap year math for epoch-to-year conversion (#15368) 2026-04-02 09:19:47 -10:00
Kevin Ahrendt b8a9d327f0 [media_player] Add enqueue action (#14775) 2026-04-02 10:40:19 -04:00
J. Nick Koston c21c7dd292 [mitsubishi_cn105] Fix test grouping conflict with uart package (#15366) 2026-04-02 09:12:38 -04:00
J. Nick Koston c84d697319 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-01 17:42:13 -10:00
J. Nick Koston bcc7b8f490 [api] Add send_sensor_state benchmarks (#15352) 2026-04-01 16:12:02 -10:00
Clyde Stubbs eefbb42be4 [lvgl] Add missing event names (#15362) 2026-04-02 14:16:56 +13:00
Boris KrivonogandJ. Nick Koston 5cdbbd4887 [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 1) (#15315)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-04-01 11:48:47 -10:00
Clyde Stubbs bdce47e764 [lvgl] Fixes #4 (#15334) 2026-04-02 10:39:51 +13:00
J. Nick Koston fd4d6beef2 Merge branch 'inline-push-item' into integration 2026-04-01 10:33:49 -10:00
J. Nick Koston 34cbe0abe1 [api] Fix stale comment: 1MB → 16MB socket buffers 2026-04-01 09:40:25 -10:00
J. Nick Koston 9fb8594a16 [api] Fix lint false positive on 'byte' in comment 2026-04-01 09:06:07 -10:00
J. Nick Koston c09d5d783c [api] Fix immediate benchmark to set batch_delay=0
should_send_immediately_ requires both should_try_send_immediately
flag AND batch_delay==0. Without setting batch_delay to 0, all
sends were falling back to the batch path.
2026-04-01 09:00:59 -10:00
J. Nick Koston d717c7b46c [api] Use large socket buffers and remove mid-loop draining
Increase socket buffer to 16MB so benchmarks never hit WOULD_BLOCK
during an inner loop iteration. Remove per-iteration drain_socket
calls that were adding noise and causing the immediate path to
fall back to batching. Drain only between outer iterations.
2026-04-01 08:54:30 -10:00
J. Nick Koston f469a7ced2 [api] Add process_batch benchmarks for single and multi-sensor
Add ProcessBatch_SingleSensor and ProcessBatch_5Sensors benchmarks
that measure the full batch processing path: queue → process_batch_ →
dispatch → encode → frame → TCP write.
2026-04-01 08:49:33 -10:00
J. Nick Koston 3a4a88df29 [api] Add warm batch benchmark and bench_clear_batch friend
Add SendSensorState_Batch_Warm that pre-warms the deferred batch vector
before benchmarking to isolate steady-state cost from allocation.
2026-04-01 08:43:38 -10:00
J. Nick Koston d3f3f89c59 [api] Extract shared TCP loopback helper for API benchmarks
Deduplicate the TCP loopback socket setup between bench_plaintext_frame
and bench_send_sensor_state into a shared bench_helpers.h header.
2026-04-01 07:48:12 -10:00
J. Nick Koston dcac526a34 [api] Add send_sensor_state benchmarks
Add benchmarks for the full send_sensor_state path covering both
immediate send and batch paths. This measures the end-to-end cost
of sending a sensor state update through an APIConnection including
entity field population, proto encode, framing, and TCP write.
2026-04-01 07:42:58 -10:00
J. Nick Koston 87a0d0d858 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-01 07:12:13 -10:00
f33fd047ee [hdc2080] Add support for HDC2080 sensor (#9331)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Big Mike <mikelawrence@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-01 12:09:22 -04:00
J. Nick Koston 6f4f852d8e Merge remote-tracking branch 'upstream/dev' into integration 2026-03-31 20:15:36 -10:00
Clyde Stubbs da6c4e20fe [lvgl] Fixes #2 (#15161) 2026-04-01 09:29:57 +13:00
J. Nick Koston 9b97e95cf3 [binary_sensor] Add on_multi_click integration test (#15329) 2026-03-31 07:42:12 -10:00
J. Nick Koston 6bad85d3e2 Merge remote-tracking branch 'origin/fix-preferences-log-spam' into integration 2026-03-30 22:39:11 -10:00
Ardumine c5eb0eb984 [internal_temperature] Add nRF52 Zephyr support (#15297) 2026-03-31 10:50:11 +13:00
Clyde Stubbs f25fa71235 [lvgl] Fix align_to directives (#15311) 2026-03-31 07:25:15 +11:00
J. Nick Koston 8561a8c495 [core] Suppress component source overflow warnings in testing mode (#15320) 2026-03-30 08:48:04 -10:00
J. Nick Koston 38fdd86384 Revert "[core] Expand component source index to 9 bits (511 max)"
This reverts commit fcfcb4ed72.
2026-03-30 08:42:23 -10:00
J. Nick Koston 9ac9814955 Merge remote-tracking branch 'upstream/component-source-9bit' into integration 2026-03-30 08:36:35 -10:00
J. Nick Koston ee6ad1aa8b Merge branch 'wifi-libretiny-state-member' into integration 2026-03-30 08:36:13 -10:00
J. Nick Koston fcfcb4ed72 [core] Expand component source index to 9 bits (511 max)
Bitfield component_source_index_ (9 bits) and warn_if_blocking_over_
(7 bits) into the same 16 bits. This doubles the max unique component
source names from 255 to 511 without increasing Component size.

The blocking warn threshold max drops from 2550ms to 1270ms which is
more than sufficient since it starts at 50ms and ratchets up.

Fixes test warnings when many components are compiled together:
WARNING Too many unique component source names (max 255)
2026-03-30 08:30:55 -10:00
J. Nick Koston 8688ef7125 [benchmark] Fix decode benchmarks being optimized away by compiler (#15293) 2026-03-30 08:24:48 -10:00
J. Nick Koston 85529ee518 Merge remote-tracking branch 'upstream/api/peel-first-write-iteration' into integration 2026-03-29 12:36:30 -10:00
J. Nick Koston a9aaf29d83 [core] Shrink Component from 12 to 8 bytes per instance (#15103) 2026-03-29 12:09:21 -10:00
J. Nick Koston 584807b039 [ld2410] Fix flaky integration test race condition (#15299) 2026-03-29 11:58:03 -10:00
J. Nick Koston 5da3253f4b [esp8266] Add enable_scanf_float option (#15284) 2026-03-29 11:57:52 -10:00
J. Nick Koston 8a802ca666 [benchmark] Add BLE raw advertisement proto encode benchmarks (#15289) 2026-03-29 11:54:07 -10:00
J. Nick Koston b1ff7bc6e4 remove heap stats 2026-03-29 08:40:41 -10:00
J. Nick Koston a12dcc68a9 Merge remote-tracking branch 'upstream/component-8byte-optimization' into integration 2026-03-29 08:36:03 -10:00
J. Nick Koston fd8b8c6546 Merge branch 'dev' into component-8byte-optimization 2026-03-29 08:25:57 -10:00