host_name and service_description examples

Andreas Ericsson ae at op5.se
Mon Jun 13 11:37:43 CEST 2005


I've made some corrections to the benchmark code, and a couple of cheap 
optimizations. For those who want to test it for themselves (a whopping 
3 downloads so far ;), I suggest you leech the new version from 
http://oss.op5.se/nagios/nagios-hash.tar.gz and give it a shake.

Ethan; If it's allright with you, I'll go ahead and implement Paul 
Hsie's hash. It looks up 1074600 hostname strings in 358msecs with the 
current table-size of 1024 buckets (compared to 987msecs for the 
additive hash currently in use). I'd also suggest wasting some memory 
here. Upping the hash-table size to 16384 buckets (64Kb on 32-bit archs) 
cuts another 40% off the average lookup time while staying fairly 
friendly to the hardware.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20




More information about the Developers mailing list