pub struct PerInstanceReporter { /* private fields */ }Expand description
Per-instance JSONL reporter.
No file-handle cache. The previous implementation kept
every (metric_name, labels) combination’s File alive in a
HashMap for the entire run, which monotonically grew the
open-FD count — for workloads with many distinct label
tuples (e.g. phase × profile × optimize_for × k × r), the
process would exhaust its ulimit -n. Each report() call
now opens, writes, and closes the target file per record.
At the 30s cadence the metrics scheduler runs this on, the
open() cost is dwarfed by the rest of the snapshot path.
Implementations§
Trait Implementations§
Source§impl Reporter for PerInstanceReporter
impl Reporter for PerInstanceReporter
fn report(&mut self, snapshot: &MetricSet)
fn flush(&mut self)
Source§fn finished(&self) -> bool
fn finished(&self) -> bool
Self-termination signal. After a
report
that leaves this true, the subscriber’s cadence-feed dispatch
worker exits its loop (calling flush on the
way out) — the subscriber receives no further pulses. A one-shot
subscriber — e.g. a settle / stop evaluator that has set a
terminal phase disposition — uses this to unregister itself
without a self-join deadlock (it runs on the worker thread, so it
cannot call unsubscribe on itself directly). Default false
(a long-lived subscriber that never self-terminates).Auto Trait Implementations§
impl Freeze for PerInstanceReporter
impl RefUnwindSafe for PerInstanceReporter
impl Send for PerInstanceReporter
impl Sync for PerInstanceReporter
impl Unpin for PerInstanceReporter
impl UnsafeUnpin for PerInstanceReporter
impl UnwindSafe for PerInstanceReporter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more