diff options
author | Costa Tsaousis <costa@netdata.cloud> | 2022-07-26 12:05:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-26 12:05:21 +0300 |
commit | e73df78a069b7fbf2547455491beb1f236d5807d (patch) | |
tree | 327829d79f26f029b4771ba9e040ad3924b6b7a4 /libnetdata/libnetdata.h | |
parent | 98e77284cbcd2fdb001302525db3f1dfe4af9389 (diff) |
Tiering statistics API endpoint (#13420)
* calculator statistics
* added metrics and metrics_pages counters
* implemented API
* updates to match sheet
* updates to match sheet No2
* fix update every calculation for single point pages
* fix lgtm finding
Diffstat (limited to 'libnetdata/libnetdata.h')
-rw-r--r-- | libnetdata/libnetdata.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libnetdata/libnetdata.h b/libnetdata/libnetdata.h index e88e5978a8..8cc6cce9f7 100644 --- a/libnetdata/libnetdata.h +++ b/libnetdata/libnetdata.h @@ -360,6 +360,16 @@ extern char *netdata_configured_host_prefix; #define RRD_STORAGE_TIERS 5 +static inline size_t struct_natural_alignment(size_t size) __attribute__((const)); + +#define STRUCT_NATURAL_ALIGNMENT (sizeof(uintptr_t) * 2) +static inline size_t struct_natural_alignment(size_t size) { + if(unlikely(size % STRUCT_NATURAL_ALIGNMENT)) + size = size + STRUCT_NATURAL_ALIGNMENT - (size % STRUCT_NATURAL_ALIGNMENT); + + return size; +} + # ifdef __cplusplus } # endif |