@cryptotaxi247 / netdata-1 / commits / d02c10ab9

probably -O3 is causing empty charts some times - still investigating

Costa Tsaousis (ktsaou) committed Dec 18, 2015 at 04:00 UTC d02c10ab990b7e2ddc8bf78815400d64e143a476
3 files changed +17 -4
netdata-installer.sh
+1 -1
@@ -105,7 +105,7 @@ run ./configure \
105 --sysconfdir="${NETDATA_PREFIX}/etc" \
106 --localstatedir="${NETDATA_PREFIX}/var" \
107 --with-zlib --with-math --with-user=netdata \
108 - CFLAGS="-O3" || exit 1
108 + CFLAGS="-O2" || exit 1
109
110 # remove the build_error hook
111 trap - EXIT
src/rrd2json.c
+15 -2
@@ -506,6 +506,9 @@ void rrdr_json_wrapper_begin(RRDR *r, BUFFER *wb, uint32_t format, uint32_t opti
506 i++;
507 }
508 if(!i) {
509 +#ifdef NETDATA_INTERNAL_CHECKS
510 + error("RRDR is empty for %s (RRDR has %d dimensions, options is 0x%08x)", r->st->id, r->d, options);
511 +#endif
512 rows = 0;
513 buffer_strcat(wb, sq);
514 buffer_strcat(wb, "no data");
@@ -1196,8 +1199,18 @@ RRDR *rrd2rrdr(RRDSET *st, long points, long long after, long long before, int g
1199 // initialize our result set
1200
1201 RRDR *r = rrdr_create(st, points);
1199 - if(!r) return NULL;
1200 - if(!r->d) return r;
1202 + if(!r) {
1203 +#ifdef NETDATA_INTERNAL_CHECKS
1204 + error("Cannot create RRDR for %s, after=%u, before=%u, duration=%u, points=%d", st->id, after, before, duration, points);
1205 +#endif
1206 + return NULL;
1207 + }
1208 + if(!r->d) {
1209 +#ifdef NETDATA_INTERNAL_CHECKS
1210 + error("Returning empty RRDR (no dimensions in RRDSET) for %s, after=%u, before=%u, duration=%u, points=%d", st->id, after, before, duration, points);
1211 +#endif
1212 + return r;
1213 + }
1214
1215 // find how many dimensions we have
1216 long dimensions = r->d;
web/dashboard.js
+1 -1
@@ -197,7 +197,7 @@
197
198 destroy_on_hide: false, // destroy charts when they are not visible
199
200 - eliminate_zero_dimensions: false, // do not show dimensions with just zeros
200 + eliminate_zero_dimensions: true, // do not show dimensions with just zeros
201
202 color_fill_opacity: {
203 line: 1.0,