SIGN IN SIGN UP

perf(db): batch process_stats inserts in a single transaction (#1783)

process_stats::insert executed each row against the pool directly, so
every row in the per-tick batch (up to PROCESS_RECORD_LIMIT * 3) committed
and fsynced independently. Wrap the loop in a single transaction and commit
once, mirroring the existing pattern in
storage_health.rs::insert_daily_records. Behaviour is unchanged; only the
commit boundary moves. An early return keeps the empty-batch path free of a
no-op transaction.

Co-authored-by: lazizbekravshanov <bruneluni23@gmail.com>
L
Lazizbek Ravshanov committed
73478465534dd0d53924028f95bb8e578dbb6cfb
Parent: d6c6f18
Committed by GitHub <noreply@github.com> on 7/9/2026, 11:59:48 AM