Skip to content

Commit

Permalink
Variable Granularity support for data collection (netdata#6430)
Browse files Browse the repository at this point in the history
* Variable Granularity support for data collection in the dbengine.

* Variable Granularity support for data collection in the daemon.

* Added tests to validate the data being queried after having been collected by changing data collection interval

* Fix memory corruption

* Updated database engine documentation about data collection frequency behaviour
  • Loading branch information
mfundul authored Aug 28, 2019
1 parent dab0eee commit 2a06960
Show file tree
Hide file tree
Showing 15 changed files with 1,604 additions and 294 deletions.
3 changes: 2 additions & 1 deletion backends/backends.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ calculated_number backend_calculate_value_from_stored_data(
}
*/
for(rd->state->query_ops.init(rd, &handle, after, before) ; !rd->state->query_ops.is_finished(&handle) ; ) {
n = rd->state->query_ops.next_metric(&handle);
time_t curr_t;
n = rd->state->query_ops.next_metric(&handle, &curr_t);

if(unlikely(!does_storage_number_exist(n))) {
// not collected
Expand Down
354 changes: 281 additions & 73 deletions daemon/unit_test.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Currently Netdata supports 6 memory modes:
database. There is some amount of RAM dedicated to data caching and indexing and the rest of
the data reside compressed on disk. The number of history entries is not fixed in this case,
but depends on the configured disk space and the effective compression ratio of the data stored.
This is the **only mode** that supports changing the data collection update frequency
(`update_every`) **without losing** the previously stored metrics.
For more details see [here](engine/).

You can select the memory mode by editing `netdata.conf` and setting:
Expand Down
2 changes: 2 additions & 0 deletions database/engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The Database Engine works like a traditional
database. There is some amount of RAM dedicated to data caching and indexing and the rest of
the data reside compressed on disk. The number of history entries is not fixed in this case,
but depends on the configured disk space and the effective compression ratio of the data stored.
This is the **only mode** that supports changing the data collection update frequency
(`update_every`) **without losing** the previously stored metrics.

## Files

Expand Down
Loading

0 comments on commit 2a06960

Please sign in to comment.