diff options
author | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-13 01:44:31 +0300 |
---|---|---|
committer | Costa Tsaousis <costa@tsaousis.gr> | 2016-08-13 01:44:31 +0300 |
commit | 9b4f149140248792bf2ccbc6e6f90222e5e078ab (patch) | |
tree | 06aeb140f3150f6efd456ad18ccc9da1fd022389 /src/plugin_checks.c | |
parent | 7be4d1e56904c079e40a45b4e1ac85e5e940653a (diff) |
global statistics now also report max API response time; global statistics implemented with alternative lock-free code; more code cleanups
Diffstat (limited to 'src/plugin_checks.c')
-rw-r--r-- | src/plugin_checks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugin_checks.c b/src/plugin_checks.c index 217cdc512e..8de62b720a 100644 --- a/src/plugin_checks.c +++ b/src/plugin_checks.c @@ -36,7 +36,7 @@ void *checks_main(void *ptr) // find the time to sleep in order to wait exactly update_every seconds gettimeofday(&now, NULL); - loop_usec = usecdiff(&now, &last); + loop_usec = usec_dt(&now, &last); usec = loop_usec - susec; debug(D_PROCNETDEV_LOOP, "CHECK: last loop took %llu usec (worked for %llu, sleeped for %llu).", loop_usec, usec, susec); @@ -72,9 +72,9 @@ void *checks_main(void *ptr) if(!apps_cpu) apps_cpu = rrdset_find("apps.cpu"); if(check3->counter_done) rrdset_next_usec(check3, loop_usec); gettimeofday(&loop, NULL); - rrddim_set(check3, "caller", (long long)usecdiff(&loop, &check1->last_collected_time)); - rrddim_set(check3, "netdata", (long long)usecdiff(&loop, &check2->last_collected_time)); - if(apps_cpu) rrddim_set(check3, "apps.plugin", (long long)usecdiff(&loop, &apps_cpu->last_collected_time)); + rrddim_set(check3, "caller", (long long) usec_dt(&loop, &check1->last_collected_time)); + rrddim_set(check3, "netdata", (long long) usec_dt(&loop, &check2->last_collected_time)); + if(apps_cpu) rrddim_set(check3, "apps.plugin", (long long) usec_dt(&loop, &apps_cpu->last_collected_time)); rrdset_done(check3); } |