]> arthur.barton.de Git - netdata.git/commitdiff
probably -O3 is causing empty charts some times - still investigating
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 18 Dec 2015 02:00:20 +0000 (04:00 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Fri, 18 Dec 2015 02:00:20 +0000 (04:00 +0200)
netdata-installer.sh
src/rrd2json.c
web/dashboard.js

index 91a09f3c40ed297917523bb5e91bbcb4f69c330b..829854726a7ea2e7405669b025c63ea8f0c8b7a1 100755 (executable)
@@ -105,7 +105,7 @@ run ./configure \
        --sysconfdir="${NETDATA_PREFIX}/etc" \
        --localstatedir="${NETDATA_PREFIX}/var" \
        --with-zlib --with-math --with-user=netdata \
-       CFLAGS="-O3" || exit 1
+       CFLAGS="-O2" || exit 1
 
 # remove the build_error hook
 trap - EXIT
index 4206d2aeb18e3e024336754180b2ba19ff15ca2f..675d158aeaed45d9b82c0da724d886b6e4438301 100755 (executable)
@@ -506,6 +506,9 @@ void rrdr_json_wrapper_begin(RRDR *r, BUFFER *wb, uint32_t format, uint32_t opti
                i++;
        }
        if(!i) {
+#ifdef NETDATA_INTERNAL_CHECKS
+               error("RRDR is empty for %s (RRDR has %d dimensions, options is 0x%08x)", r->st->id, r->d, options);
+#endif
                rows = 0;
                buffer_strcat(wb, sq);
                buffer_strcat(wb, "no data");
@@ -1196,8 +1199,18 @@ RRDR *rrd2rrdr(RRDSET *st, long points, long long after, long long before, int g
        // initialize our result set
 
        RRDR *r = rrdr_create(st, points);
-       if(!r) return NULL;
-       if(!r->d) return r;
+       if(!r) {
+#ifdef NETDATA_INTERNAL_CHECKS
+               error("Cannot create RRDR for %s, after=%u, before=%u, duration=%u, points=%d", st->id, after, before, duration, points);
+#endif
+               return NULL;
+       }
+       if(!r->d) {
+#ifdef NETDATA_INTERNAL_CHECKS
+               error("Returning empty RRDR (no dimensions in RRDSET) for %s, after=%u, before=%u, duration=%u, points=%d", st->id, after, before, duration, points);
+#endif
+               return r;
+       }
 
        // find how many dimensions we have
        long dimensions = r->d;
index 8b753d42daf1bada2726c7edca9b308a11afaecc..0ae84df1d5aa1c61674c693a4c29611dacf32244 100755 (executable)
 
                        destroy_on_hide: false,         // destroy charts when they are not visible
 
-                       eliminate_zero_dimensions: false, // do not show dimensions with just zeros
+                       eliminate_zero_dimensions: true, // do not show dimensions with just zeros
 
                        color_fill_opacity: {
                                line: 1.0,