}
}
}
-
+#ifdef MODIFY_DEBUG
+ fprintf(stderr, "chosen candidate index=%d row_cnt=%ld\n", chosen_candidate->rra_index, chosen_candidate->rra->row_cnt);
+#endif
int start_cdp_index_out = out->stat_head->ds_cnt * curr_rra;
for (int i = 0 ; i < (int) out->stat_head->ds_cnt ; i++) {
ccdp->scratch[CDP_primary_val].u_val;
} else {
int pre_start = start_row - 1;
- if (pre_start == 0) pre_start = chosen_candidate->rra->row_cnt;
+ if (pre_start < 0) pre_start = chosen_candidate->rra->row_cnt - 1;
cdp_prep->scratch[CDP_secondary_val].u_val =
chosen_candidate->values[ds_cnt * pre_start + mapped_i];
$RRDTOOL dump ${BASE}a2.rrd | $DIFF ${BASE}a2-create.dump -
report create 2
-for U in 1300003010:200 1300003070:102 1300003130:777 1300003190:645 1300003250:122 1300003310:981 1300003323:223 1300003381:721
+for U in 1300003010:200 1300003070:102 1300003130:777 1300003190:645 1300003250:122 1300003310:981 1300003323:223 1300003381:721 1300003445:821 1300003500:221 1300003562:231 1300003637:542 1300003699:734 1300003769:9231 1300003823:17
do
echo ---------------------iterate--------------------------
# update both - both contain same data