mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
zeek.bif: Implement table_pattern_matcher_stats() bif for introspection
Provide a script accessible way to introspect the DFA stats that can be leveraged to gather runtime statistics of the underlying DFA. This re-uses the existing MatcherStats used by ``get_matcher_stats()``.
This commit is contained in:
parent
3f240e0f0a
commit
e39f280e3d
6 changed files with 116 additions and 0 deletions
|
@ -53,6 +53,8 @@ class CompositeHash;
|
|||
class HashKey;
|
||||
class TablePatternMatcher;
|
||||
|
||||
struct DFA_State_Cache_Stats;
|
||||
|
||||
class ValTrace;
|
||||
class ZBody;
|
||||
class CPPRuntime;
|
||||
|
@ -869,6 +871,10 @@ public:
|
|||
// Causes an internal error if called for any other kind of table.
|
||||
VectorValPtr LookupPattern(const StringValPtr& s);
|
||||
|
||||
// For a table[pattern], fill stats with information about
|
||||
// the DFA's state for introspection.
|
||||
void GetPatternMatcherStats(detail::DFA_State_Cache_Stats* stats) const;
|
||||
|
||||
// Sets the timestamp for the given index to network time.
|
||||
// Returns false if index does not exist.
|
||||
bool UpdateTimestamp(Val* index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue