Profiling support for DNS_Mgr and triggers.

With misc/profiling.bro, both now report a line in prof.log with some
counters on usage.
This commit is contained in:
Robin Sommer 2011-10-09 16:28:46 -07:00
parent bd9c937236
commit df4a22a27d
6 changed files with 77 additions and 2 deletions

View file

@ -67,6 +67,13 @@ public:
// Evaluates all queued Triggers.
static void EvaluatePending();
struct Stats {
unsigned long total;
unsigned long pending;
};
static void GetStats(Stats* stats);
private:
friend class TriggerTraversalCallback;
friend class TriggerTimer;
@ -99,6 +106,8 @@ private:
typedef list<Trigger*> TriggerList;
static TriggerList* pending;
static unsigned long total_triggers;
};
#endif