summaryrefslogtreecommitdiffstats
path: root/database/rrd.h
diff options
context:
space:
mode:
Diffstat (limited to 'database/rrd.h')
-rw-r--r--database/rrd.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/database/rrd.h b/database/rrd.h
index 1d6a869d22..2c4ea95c84 100644
--- a/database/rrd.h
+++ b/database/rrd.h
@@ -120,8 +120,8 @@ typedef struct storage_point {
time_t start_time_s; // the time the point starts
time_t end_time_s; // the time the point ends
- unsigned count; // the number of original points aggregated
- unsigned anomaly_count; // the number of original points found anomalous
+ size_t count; // the number of original points aggregated
+ size_t anomaly_count; // the number of original points found anomalous
SN_FLAGS flags; // flags stored with the point
} STORAGE_POINT;
@@ -302,6 +302,25 @@ int rrdlabels_unittest(void);
bool exporting_labels_filter_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data);
// ----------------------------------------------------------------------------
+// engine-specific iterator state for dimension data collection
+typedef struct storage_collect_handle STORAGE_COLLECT_HANDLE;
+
+// ----------------------------------------------------------------------------
+// Storage tier data for every dimension
+
+struct rrddim_tier {
+ STORAGE_POINT virtual_point;
+ size_t tier_grouping;
+ time_t next_point_time_s;
+ STORAGE_METRIC_HANDLE *db_metric_handle; // the metric handle inside the database
+ STORAGE_COLLECT_HANDLE *db_collection_handle; // the data collection handle
+ struct storage_engine_collect_ops *collect_ops;
+ struct storage_engine_query_ops *query_ops;
+};
+
+void rrdr_fill_tier_gap_from_smaller_tiers(RRDDIM *rd, size_t tier, time_t now_s);
+
+// ----------------------------------------------------------------------------
// RRD DIMENSION - this is a metric
struct rrddim {
@@ -343,7 +362,7 @@ struct rrddim {
// ------------------------------------------------------------------------
// data collection members
- struct rrddim_tier *tiers[RRD_STORAGE_TIERS]; // our tiers of databases
+ struct rrddim_tier tiers[RRD_STORAGE_TIERS]; // our tiers of databases
struct timeval last_collected_time; // when was this dimension last updated
// this is actual date time we updated the last_collected_value
@@ -417,10 +436,6 @@ void rrddim_memory_file_save(RRDDIM *rd);
#define storage_point_is_unset(x) (!(x).count)
#define storage_point_is_empty(x) (!netdata_double_isnumber((x).sum))
-// ----------------------------------------------------------------------------
-// engine-specific iterator state for dimension data collection
-typedef struct storage_collect_handle STORAGE_COLLECT_HANDLE;
-
// ------------------------------------------------------------------------
// function pointers that handle data collection
struct storage_engine_collect_ops {
@@ -498,21 +513,6 @@ STORAGE_ENGINE* storage_engine_get(RRD_MEMORY_MODE mmode);
STORAGE_ENGINE* storage_engine_find(const char* name);
// ----------------------------------------------------------------------------
-// Storage tier data for every dimension
-
-struct rrddim_tier {
- size_t tier_grouping;
- STORAGE_METRIC_HANDLE *db_metric_handle; // the metric handle inside the database
- STORAGE_COLLECT_HANDLE *db_collection_handle; // the data collection handle
- STORAGE_POINT virtual_point;
- time_t next_point_time_s;
- struct storage_engine_collect_ops *collect_ops;
- struct storage_engine_query_ops *query_ops;
-};
-
-void rrdr_fill_tier_gap_from_smaller_tiers(RRDDIM *rd, size_t tier, time_t now_s);
-
-// ----------------------------------------------------------------------------
// these loop macros make sure the linked list is accessed with the right lock
#define rrddim_foreach_read(rd, st) \