summaryrefslogtreecommitdiffstats
path: root/exporting/process_data.c
diff options
context:
space:
mode:
Diffstat (limited to 'exporting/process_data.c')
-rw-r--r--exporting/process_data.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/exporting/process_data.c b/exporting/process_data.c
index fbcda0d9b..eb492535d 100644
--- a/exporting/process_data.c
+++ b/exporting/process_data.c
@@ -77,8 +77,8 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data(
time_t before = instance->before;
// find the edges of the rrd database for this chart
- time_t first_t = rd->tiers[0]->query_ops->oldest_time(rd->tiers[0]->db_metric_handle);
- time_t last_t = rd->tiers[0]->query_ops->latest_time(rd->tiers[0]->db_metric_handle);
+ time_t first_t = rd->tiers[0].query_ops->oldest_time_s(rd->tiers[0].db_metric_handle);
+ time_t last_t = rd->tiers[0].query_ops->latest_time_s(rd->tiers[0].db_metric_handle);
time_t update_every = st->update_every;
struct storage_engine_query_handle handle;
@@ -126,11 +126,11 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data(
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);
+ for (rd->tiers[0].query_ops->init(rd->tiers[0].db_metric_handle, &handle, after, before, STORAGE_PRIORITY_LOW); !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))) {
+ if (unlikely(storage_point_is_gap(sp))) {
// not collected
continue;
}
@@ -138,7 +138,7 @@ NETDATA_DOUBLE exporting_calculate_value_from_stored_data(
sum += sp.sum;
counter += sp.count;
}
- rd->tiers[0]->query_ops->finalize(&handle);
+ rd->tiers[0].query_ops->finalize(&handle);
global_statistics_exporters_query_completed(points_read);
if (unlikely(!counter)) {
@@ -397,7 +397,7 @@ int simple_connector_end_batch(struct instance *instance)
struct simple_connector_buffer *last_buffer = simple_connector_data->last_buffer;
if (!last_buffer->buffer) {
- last_buffer->buffer = buffer_create(0);
+ last_buffer->buffer = buffer_create(0, &netdata_buffers_statistics.buffers_exporters);
}
if (last_buffer->used) {
@@ -419,7 +419,7 @@ int simple_connector_end_batch(struct instance *instance)
if (last_buffer->header)
buffer_flush(last_buffer->header);
else
- last_buffer->header = buffer_create(0);
+ last_buffer->header = buffer_create(0, &netdata_buffers_statistics.buffers_exporters);
if (instance->prepare_header)
instance->prepare_header(instance);