|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
42 #ifndef GST_NVMODELMUX_PERF_H
43 #define GST_NVMODELMUX_PERF_H
48 #define MM_PERF_DEFAULT_INTERVAL_SEC 5
49 #define MM_PERF_MIN_INTERVAL_SEC 1
51 #define MM_PERF_MAX_SOURCES 256
135 guint * mem_total_mb);
void modelmux_perf_counter_clear(ModelMuxPerfCounter *c)
Zero a counter (totals + snapshot).
void modelmux_perf_free(ModelMuxPerf *p)
gdouble lat_ms
published: avg latency (ms) over the last window
ModelMuxPerfCounter agg
bin aggregate (model throughput/latency)
gdouble fps
published: frames/sec over the last window
#define MM_PERF_MAX_SOURCES
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).
ModelMuxPerfCounter by_source[MM_PERF_MAX_SOURCES]
per source_id
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.
gint64 t_enter_us
bin-head batch arrival (single writer)
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.
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).
guint64 frames
frames counted
ModelMuxPerf * modelmux_perf_new(void)
void modelmux_perf_tick(ModelMuxPerf *p, gint64 now_us)
Caller-locked: tick the aggregate + every active per-source counter.
void modelmux_perf_counter_tick(ModelMuxPerfCounter *c, gint64 now_us)
Recompute fps/lat_ms from the delta since the previous tick; advance the window.
struct _MmPerf ModelMuxPerf
guint64 lat_n
number of latency samples
void modelmux_perf_get_model(const ModelMuxPerf *p, gdouble *fps, gdouble *lat_ms)
Caller-locked: read the aggregate snapshot.
guint64 lat_sum_us
sum of per-record latencies (us)
gint64 last_ts_us
monotonic time of the previous tick (0 => uninit)
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.