dnsproxy: Track cache hit statistics
authorArjan van de Ven <arjan@linux.intel.com>
Tue, 10 Jan 2012 00:08:45 +0000 (16:08 -0800)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 10 Jan 2012 12:43:57 +0000 (13:43 +0100)
commitce243d289f022921d21168e3682abe5d6f901340
tree39dc1351c6ad2afed802b8f277a4a652ca711553
parent441e41382b97c7ff8802a2ed78f4ca6a0c672489
dnsproxy: Track cache hit statistics

For various decisions (which entries to prune, which entries to refresh)
and for debugging, it's useful to track how many hits a cache entry
gets.

This patch adds the basic counting for this; the only tricky aspect
is that we serve DNS entries out of the cache, even in case of a miss,
so we need to compensate for that by subtracting a hit first.
src/dnsproxy.c