summaryrefslogtreecommitdiffstats
path: root/web/api/formatters/value/value.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/formatters/value/value.c')
-rw-r--r--web/api/formatters/value/value.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/web/api/formatters/value/value.c b/web/api/formatters/value/value.c
index dc0c81b8c9..c906339334 100644
--- a/web/api/formatters/value/value.c
+++ b/web/api/formatters/value/value.c
@@ -4,9 +4,7 @@
inline NETDATA_DOUBLE rrdr2value(RRDR *r, long i, RRDR_OPTIONS options, int *all_values_are_null, NETDATA_DOUBLE *anomaly_rate) {
- QUERY_TARGET *qt = r->internal.qt;
- long c;
- const long used = qt->query.used;
+ size_t c;
NETDATA_DOUBLE *cn = &r->v[ i * r->d ];
RRDR_VALUE_FLAGS *co = &r->o[ i * r->d ];
@@ -21,7 +19,7 @@ inline NETDATA_DOUBLE rrdr2value(RRDR *r, long i, RRDR_OPTIONS options, int *all
int set_min_max = 0;
if(unlikely(options & RRDR_OPTION_PERCENTAGE)) {
total = 0;
- for (c = 0; c < used; c++) {
+ for (c = 0; c < r->d ; c++) {
if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue;
NETDATA_DOUBLE n = cn[c];
@@ -36,7 +34,7 @@ inline NETDATA_DOUBLE rrdr2value(RRDR *r, long i, RRDR_OPTIONS options, int *all
}
// for each dimension
- for (c = 0; c < used; c++) {
+ for (c = 0; c < r->d ; c++) {
if(!rrdr_dimension_should_be_exposed(r->od[c], options))
continue;
@@ -147,7 +145,7 @@ QUERY_VALUE rrdmetric2value(RRDHOST *host,
};
for(size_t t = 0; t < storage_tiers ;t++)
- qv.storage_points_per_tier[t] = r->stats.tier_points_read[t];
+ qv.storage_points_per_tier[t] = r->internal.qt->db.tiers[t].points;
long i = (!(options & RRDR_OPTION_REVERSED))?(long)rrdr_rows(r) - 1:0;
int all_values_are_null = 0;