From 9232bfb6a072155388578dc4e1338c6002afb515 Mon Sep 17 00:00:00 2001 From: Costa Tsaousis Date: Fri, 20 Jan 2023 00:50:42 +0200 Subject: track memory footprint of Netdata (#14294) * track memory footprint of Netdata * track db modes alloc/ram/save/map * track system info; track sender and receiver * fixes * more fixes * track workers memory, onewayalloc memory; unify judyhs size estimation * track replication structures and buffers * Properly clear host RRDHOST_FLAG_METADATA_UPDATE flag * flush the replication buffer every 1000 times the circular buffer is found empty * dont take timestamp too frequently in sender loop * sender buffers are not used by the same thread as the sender, so they were never recreated - fixed it * free sender thread buffer on replication threads when replication is idle * use the last sender flag as a timestamp of the last buffer recreation * free cbuffer before reconnecting * recreate cbuffer on every flush * timings for journal v2 loading * inlining of metric and cache functions * aral likely/unlikely * free left-over thread buffers * fix NULL pointer dereference in replication * free sender thread buffer on sender thread too * mark ctx as used before flushing * better logging on ctx datafiles closing Co-authored-by: Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> --- ml/Query.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ml') diff --git a/ml/Query.h b/ml/Query.h index bfc8e023be..42a96e85b5 100644 --- a/ml/Query.h +++ b/ml/Query.h @@ -8,19 +8,19 @@ namespace ml { class Query { public: Query(RRDDIM *RD) : RD(RD), Initialized(false) { - Ops = RD->tiers[0]->query_ops; + Ops = RD->tiers[0].query_ops; } time_t latestTime() { - return Ops->latest_time_s(RD->tiers[0]->db_metric_handle); + return Ops->latest_time_s(RD->tiers[0].db_metric_handle); } time_t oldestTime() { - return Ops->oldest_time_s(RD->tiers[0]->db_metric_handle); + return Ops->oldest_time_s(RD->tiers[0].db_metric_handle); } void init(time_t AfterT, time_t BeforeT) { - Ops->init(RD->tiers[0]->db_metric_handle, &Handle, AfterT, BeforeT, STORAGE_PRIORITY_BEST_EFFORT); + Ops->init(RD->tiers[0].db_metric_handle, &Handle, AfterT, BeforeT, STORAGE_PRIORITY_BEST_EFFORT); Initialized = true; points_read = 0; } -- cgit v1.2.3