MCPcopy Create free account
hub / github.com/logpai/logparser / SimpleLoopMatch

Method SimpleLoopMatch

logparser/Spell/Spell.py:96–107  ·  view source on GitHub ↗
(self, logClustL, seq)

Source from the content-addressed store, hash-verified

94 return result
95
96 def SimpleLoopMatch(self, logClustL, seq):
97 for logClust in logClustL:
98 if float(len(logClust.logTemplate)) < 0.5 * len(seq):
99 continue
100 # Check the template is a subsequence of seq (we use set checking as a proxy here for speedup since
101 # incorrect-ordering bad cases rarely occur in logs)
102 token_set = set(seq)
103 if all(
104 token in token_set or token == "<*>" for token in logClust.logTemplate
105 ):
106 return logClust
107 return None
108
109 def PrefixTreeMatch(self, parentn, seq, idx):
110 retLogClust = None

Callers 1

parseMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected