mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
DFA: Extract inner Stats struct from DFA_State_Cache
This makes it possible to forward declare the class in Val.h which otherwise seems difficult.
This commit is contained in:
parent
c72d4a4427
commit
3f240e0f0a
1 changed files with 12 additions and 11 deletions
23
src/DFA.h
23
src/DFA.h
|
@ -69,6 +69,17 @@ protected:
|
|||
|
||||
using DigestStr = std::basic_string<u_char>;
|
||||
|
||||
struct DFA_State_Cache_Stats {
|
||||
// Sum of all NFA states
|
||||
unsigned int nfa_states;
|
||||
unsigned int dfa_states;
|
||||
unsigned int computed;
|
||||
unsigned int uncomputed;
|
||||
unsigned int mem;
|
||||
unsigned int hits;
|
||||
unsigned int misses;
|
||||
};
|
||||
|
||||
class DFA_State_Cache {
|
||||
public:
|
||||
DFA_State_Cache();
|
||||
|
@ -82,17 +93,7 @@ public:
|
|||
|
||||
int NumEntries() const { return states.size(); }
|
||||
|
||||
struct Stats {
|
||||
// Sum of all NFA states
|
||||
unsigned int nfa_states;
|
||||
unsigned int dfa_states;
|
||||
unsigned int computed;
|
||||
unsigned int uncomputed;
|
||||
unsigned int mem;
|
||||
unsigned int hits;
|
||||
unsigned int misses;
|
||||
};
|
||||
|
||||
using Stats = DFA_State_Cache_Stats;
|
||||
void GetStats(Stats* s);
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue