summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_dcstat.c
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2022-06-28 17:04:37 +0300
committerGitHub <noreply@github.com>2022-06-28 17:04:37 +0300
commitc3dfbe52a61dd0d1995bc420b0e0576cf058fd74 (patch)
tree193bfe3de88bff1a8effb9dd062a96beda8d16c6 /collectors/ebpf.plugin/ebpf_dcstat.c
parente86cec2631c961b434031e2e09597701a9ec53f8 (diff)
netdata doubles (#13217)
* netdata doubles * fix cmocka test * fix cmocka test again * fix left-overs of long double to NETDATA_DOUBLE * RRDDIM detached from disk representation; db settings in [db] section of netdata.conf * update the memory before saving * rrdset is now detached from file structures too * on memory mode map, update the memory mapped structures on every iteration * allow RRD_ID_LENGTH_MAX to be changed * granularity secs, back to update every * fix formatting * more formatting
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_dcstat.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.c b/collectors/ebpf.plugin/ebpf_dcstat.c
index 619d8520ba..732a4102e5 100644
--- a/collectors/ebpf.plugin/ebpf_dcstat.c
+++ b/collectors/ebpf.plugin/ebpf_dcstat.c
@@ -239,8 +239,8 @@ static inline int ebpf_dc_load_and_attach(struct dc_bpf *obj, ebpf_module_t *em)
*/
void dcstat_update_publish(netdata_publish_dcstat_t *out, uint64_t cache_access, uint64_t not_found)
{
- calculated_number successful_access = (calculated_number) (((long long)cache_access) - ((long long)not_found));
- calculated_number ratio = (cache_access) ? successful_access/(calculated_number)cache_access : 0;
+ NETDATA_DOUBLE successful_access = (NETDATA_DOUBLE) (((long long)cache_access) - ((long long)not_found));
+ NETDATA_DOUBLE ratio = (cache_access) ? successful_access/(NETDATA_DOUBLE)cache_access : 0;
out->ratio = (long long )(ratio*100);
}