Re: [Nagios-devel] Patch for Circular Paths (new algo) 70s->0.007s
Posted: Fri Feb 01, 2008 2:28 am
Andreas Ericsson wrote:
> nap wrote:
>> Hi list,
>>
>> I finish my patch for the host path part. I try to folow the
>> indentation and the coding style of nagios.
>
> It looks a lot better now. For extra points, remove the hunks that
> only insert whitespace changes.
>
>> you can find test files with a lot of parent/childs at
>> http://zegabes.free.fr/nagios/ .
>>
>
> What's lacking from that place is the objects.cache using the old
> code and one generated using the new one, especially with multiple
> parents, as well as a diff between them so one can see what, if any,
> the differences are.
>
I take that back. What's lacking is a proper test-case. If the config
you've been using to test is the one on that site, you haven't even
scratched at the funnier configs one sometimes see.
For now, you're doing a "parent -> 100 children" thing, which is
obviously quite quick and very simple to get correct values for.
Will your algorithm work for something like this?
parent2 parent8 ----------
/ \ / \
parent0 - parent3 - parent5 - parent6 - parent7 \
\ / \ \
parent4 parent9 - parent10 - endhost
/ /
/ /
/ /
parent11-----------------------------------------------------------
Which is indeed a rather messy and complex scheme, but something that
nagios should handle (it does today, so it has to do so tomorrow too).
Optimizing for speed in the simple (and probably most common cases) is
all fine and good, but if things suddenly break horribly for 15-20% of
the user-base, it isn't worth a thing.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> nap wrote:
>> Hi list,
>>
>> I finish my patch for the host path part. I try to folow the
>> indentation and the coding style of nagios.
>
> It looks a lot better now. For extra points, remove the hunks that
> only insert whitespace changes.
>
>> you can find test files with a lot of parent/childs at
>> http://zegabes.free.fr/nagios/ .
>>
>
> What's lacking from that place is the objects.cache using the old
> code and one generated using the new one, especially with multiple
> parents, as well as a diff between them so one can see what, if any,
> the differences are.
>
I take that back. What's lacking is a proper test-case. If the config
you've been using to test is the one on that site, you haven't even
scratched at the funnier configs one sometimes see.
For now, you're doing a "parent -> 100 children" thing, which is
obviously quite quick and very simple to get correct values for.
Will your algorithm work for something like this?
parent2 parent8 ----------
/ \ / \
parent0 - parent3 - parent5 - parent6 - parent7 \
\ / \ \
parent4 parent9 - parent10 - endhost
/ /
/ /
/ /
parent11-----------------------------------------------------------
Which is indeed a rather messy and complex scheme, but something that
nagios should handle (it does today, so it has to do so tomorrow too).
Optimizing for speed in the simple (and probably most common cases) is
all fine and good, but if things suddenly break horribly for 15-20% of
the user-base, it isn't worth a thing.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]