summaryrefslogtreecommitdiffstats
path: root/exporting
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-11-28 12:22:38 +0200
committerGitHub <noreply@github.com>2022-11-28 12:22:38 +0200
commit53a13ab8e110923d097968353a6bc1e22399480f (patch)
treea22fe110436844fcc0331073d37182adefbf0edc /exporting
parent1e9f2c7a2a866be27203c528067adecd283e0ceb (diff)
replication fixes No 7 (#14053)
* move global statistics workers to a separate thread; query statistics per query source; query statistics for ML, exporters, backfilling; reset replication point in time every 10 seconds, instead of every 1; fix compilation warnings; optimize the replication queries code; prevent long tail of replication requests (big sleeps); provide query statistics about replication ; optimize replication sender when most senders are full; optimize replication_request_get_first_available(); reset replication completion calculation; * remove workers utilization from global statistics thread
Diffstat (limited to 'exporting')
-rw-r--r--exporting/process_data.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/exporting/process_data.c b/exporting/process_data.c
index 53b028f800..fbcda0d9b7 100644
--- a/exporting/process_data.c
+++ b/exporting/process_data.c
@@ -122,11 +122,13 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data(
*last_timestamp = before;
+ size_t points_read = 0;
size_t counter = 0;
NETDATA_DOUBLE sum = 0;
for (rd->tiers[0]->query_ops->init(rd->tiers[0]->db_metric_handle, &handle, after, before); !rd->tiers[0]->query_ops->is_finished(&handle);) {
STORAGE_POINT sp = rd->tiers[0]->query_ops->next_metric(&handle);
+ points_read++;
if (unlikely(storage_point_is_empty(sp))) {
// not collected
@@ -137,6 +139,7 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data(
counter += sp.count;
}
rd->tiers[0]->query_ops->finalize(&handle);
+ global_statistics_exporters_query_completed(points_read);
if (unlikely(!counter)) {
debug(