[rrd-developers] Re: LINE2 precision in rrdtool 1.1.x

Stanislav Sinyagin ssinyagin at yahoo.com
Wed Jan 15 10:42:53 MET 2003


I looked through rrd_create.c, and couldn't find any code that 
sorts the RRAs by step size. Thus, something like the code of 
Rutger should work. I'll do some tests soon.

Thanks, 
Stan


--- Rutger Sassen <rrdtool-developer at rutger.nl> wrote:
>     long  best_part_step_diff=0, tmp_part_step_diff=0;
>     ...
>     } else {
>                 /* best partial match */
>                 tmp_match = full_match;
>                 if (cal_start>*start)
>                     tmp_match -= (cal_start-*start);
>                 if (cal_end<*end)
>                     tmp_match -= (*end-cal_end);
>                 tmp_part_step_diff = labs(*step - (rrd.stat_head->pdp_step
>                                               * rrd.rra_def[i].pdp_cnt));
>                 if (first_part || best_match < tmp_match ||
>                         ((best_match == tmp_match) &&
>                         (tmp_part_step_diff < best_part_step_diff) )){
>                     first_part=0;
>                     best_match = tmp_match;
>                     best_part_rra =i;
>                     best_part_step_diff = tmp_part_step_diff;
>                 }

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-developers mailing list