19 lines
416 B
Python
19 lines
416 B
Python
from collections import defaultdict
|
|
|
|
from log_analyzer import LogSettings
|
|
|
|
from .analyzer import Analyzer
|
|
|
|
|
|
class BoardDurationAnalyzer(Analyzer):
|
|
def result(self) -> object:
|
|
return self.store
|
|
|
|
def process(self, entry: dict) -> bool:
|
|
self.store[entry[self.settings.entry_type]] += 1
|
|
return False
|
|
|
|
def __init__(self, settings: LogSettings):
|
|
super().__init__(settings)
|
|
self.store = defaultdict(lambda: 0)
|