Add dbg_before() and dbg_after()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 4 Oct 2008 08:01:54 +0000 (10:01 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 4 Oct 2008 08:01:54 +0000 (10:01 +0200)
commit54071312f3d21f0f5677cb07081f8367ea906b39
tree5d028b9d3ab75f12ba55c523e83f6cfb41c2de8e
parent849809e97ec6fadd4e31353f473473e196323b5b
Add dbg_before() and dbg_after()

Other two debug utilities to compute filter rate.

Usage is:

dbg_before(); // counts passages from this point

if(..) // complex code stuff you want to audit
  return/continue
if(...)
  .....

dbg_after(); // counts passages from this point

Then somewhere in the code, normally in poll() add
dbg_print_hit_rate() and you will see the filter rate
of your code under auditing.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.h