Go to the source code of this file.
Data Structures | |
| struct | ModelMuxPerfCounter |
| struct | _MmPerf |
Macros | |
| #define | MM_PERF_DEFAULT_INTERVAL_SEC 5 |
| #define | MM_PERF_MIN_INTERVAL_SEC 1 |
| #define | MM_PERF_MAX_SOURCES 256 |
Typedefs | |
| typedef struct _MmPerf | ModelMuxPerf |
Functions | |
| static void | modelmux_perf_counter_record (ModelMuxPerfCounter *c, guint64 lat_us) |
| Hot-path record: count one frame; if lat_us>0 also add a latency sample. More... | |
| void | modelmux_perf_counter_tick (ModelMuxPerfCounter *c, gint64 now_us) |
| Recompute fps/lat_ms from the delta since the previous tick; advance the window. More... | |
| void | modelmux_perf_counter_clear (ModelMuxPerfCounter *c) |
| Zero a counter (totals + snapshot). More... | |
| ModelMuxPerf * | modelmux_perf_new (void) |
| void | modelmux_perf_free (ModelMuxPerf *p) |
| static void | modelmux_perf_mark_bin_in (ModelMuxPerf *p, gint64 now_us) |
| HOT PATH: stamp the batch arrival time at the BIN's inference head. More... | |
| void | modelmux_perf_mark_bin_out (ModelMuxPerf *p, gint64 now_us, gint source_id) |
| HOT PATH: called once per output frame at the BIN's inference tail. More... | |
| void | modelmux_perf_tick (ModelMuxPerf *p, gint64 now_us) |
| Caller-locked: tick the aggregate + every active per-source counter. More... | |
| void | modelmux_perf_get_model (const ModelMuxPerf *p, gdouble *fps, gdouble *lat_ms) |
| Caller-locked: read the aggregate snapshot. More... | |
| void | modelmux_perf_get_source (const ModelMuxPerf *p, gint source_id, gdouble *fps, gdouble *lat_ms) |
| Caller-locked: read a per-source snapshot (0/0 if unknown source or NULL). More... | |
| gboolean | modelmux_gpu_stats (gint gpu, guint *util_pct, guint *mem_used_mb, guint *mem_total_mb) |
| WHOLE-device stats via NVML (dlopen'd lazily; FALSE = NVML/device unavailable). More... | |
| #define MM_PERF_DEFAULT_INTERVAL_SEC 5 |
Definition at line 48 of file 9.2/sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_perf.h.
| #define MM_PERF_MAX_SOURCES 256 |
Definition at line 51 of file 9.2/sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_perf.h.
| #define MM_PERF_MIN_INTERVAL_SEC 1 |
Definition at line 49 of file 9.2/sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_perf.h.
| typedef struct _MmPerf ModelMuxPerf |
| gboolean modelmux_gpu_stats | ( | gint | gpu, |
| guint * | util_pct, | ||
| guint * | mem_used_mb, | ||
| guint * | mem_total_mb | ||
| ) |
WHOLE-device stats via NVML (dlopen'd lazily; FALSE = NVML/device unavailable).
Attribution to a model is by CO-LOCATION only (which instances run there).
| void modelmux_perf_counter_clear | ( | ModelMuxPerfCounter * | c | ) |
Zero a counter (totals + snapshot).
|
inlinestatic |
Hot-path record: count one frame; if lat_us>0 also add a latency sample.
Lock-free.
Definition at line 88 of file 9.2/sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_perf.h.
References ModelMuxPerfCounter::frames, ModelMuxPerfCounter::lat_n, and ModelMuxPerfCounter::lat_sum_us.
| void modelmux_perf_counter_tick | ( | ModelMuxPerfCounter * | c, |
| gint64 | now_us | ||
| ) |
Recompute fps/lat_ms from the delta since the previous tick; advance the window.
The FIRST tick (last_ts_us==0) only establishes the baseline (reports 0). Caller-locked.
| void modelmux_perf_free | ( | ModelMuxPerf * | p | ) |
| void modelmux_perf_get_model | ( | const ModelMuxPerf * | p, |
| gdouble * | fps, | ||
| gdouble * | lat_ms | ||
| ) |
Caller-locked: read the aggregate snapshot.
| void modelmux_perf_get_source | ( | const ModelMuxPerf * | p, |
| gint | source_id, | ||
| gdouble * | fps, | ||
| gdouble * | lat_ms | ||
| ) |
Caller-locked: read a per-source snapshot (0/0 if unknown source or NULL).
|
inlinestatic |
HOT PATH: stamp the batch arrival time at the BIN's inference head.
Definition at line 111 of file 9.2/sources/gst-plugins/gst-nvmodelmux/gstnvmodelmux_perf.h.
References _MmPerf::t_enter_us.
| void modelmux_perf_mark_bin_out | ( | ModelMuxPerf * | p, |
| gint64 | now_us, | ||
| gint | source_id | ||
| ) |
HOT PATH: called once per output frame at the BIN's inference tail.
Derives the batch latency (now - t_enter, identical for every frame of the batch) and records it into the aggregate and the frame's per-source counter. now_us should be sampled ONCE per batch by the caller and passed unchanged for every frame of that batch.
| ModelMuxPerf* modelmux_perf_new | ( | void | ) |
| void modelmux_perf_tick | ( | ModelMuxPerf * | p, |
| gint64 | now_us | ||
| ) |
Caller-locked: tick the aggregate + every active per-source counter.