[rrd-users] Re: Does min, max and rigid option combination cause a speed up?

Németh László Laszlo.Nemeth at netvisor.hu
Mon May 26 17:02:43 MEST 2003

```I think you are not right since it can be like this:

dont_calculate_min=0
dont_calculate_max=0
cur_max
cur_min

if --rigid is set then
if --upper-limit is set then
cur_max=upper-limit
dont_calculate_max=1
fi

if --lower-limit is set then
cur_min=lower-limit
dont_calculate_min=1
fi
fi

if dont_calculate_max==0 or dont_calculate_min==0 then
iterate_on_values_calculate_minmax
fi

br,
Laszlo

> -----Original Message-----
> From: Alex van den Bogaerdt [mailto:alex at ergens.op.het.net]
> Sent: Monday, May 26, 2003 4:47 PM
> To: RRD users
> Subject: [rrd-users] Re: Does min, max and rigid option
> combination cause a speed up?
>
>
> On Mon, May 26, 2003 at 03:03:13PM +0200, Németh László wrote:
> > Hi,
> >
> > my question is if you use the options:
> > --rigid, --upper-limit, --lower-limit
> >
> > does it speed up graph production (I guess yes)? If yes,
> > can anybody give an approxmation how many percents it means?
>
> I don't think it will make much difference.  In fact, I do
> think those options will slow it down by 0.00000000000000000000001%
>
> Think of the process like this:
>
> - look for minimum visible value   -> cur_min
> - look for maximum visible value   -> cur_max
> - if --upper-limit is set
>     then
>        if upper-limit > cur_max
>           then
>               cur_max = upper-limit
>        fi
>   fi
> - if --lower-limit is set
>     then
>        if lower-limit < cur_min
>           then
>               cur_min = lower-limit
>        fi
>   fi
> - if --rigid is set
>     then
>        cur_min = lower-limit
>        cur_max = upper-limit
>   fi
> - graph from cur_min to cur_max
>
>
> Maybe (and I didn't look in the source so emphasis on maybe!)
> the code is optimized and contains "if --rigid then ... else ...".
>
> This all is probably not worth the effort; I'm serious about
> the mentioned percentage!
>
> HTH
> Alex
>
> --
> Unsubscribe
> mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
>
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users