from tracer.structure import Structure
class AnalysisRunner(object):
- '''Iterate over a log and dispatch to a set of analyzers'''
+ """
+ Runs several Analyzers over a log.
+
+ Iterates log using a Parser and dispatches to a set of analyzers.
+ """
def __init__(self, log):
self.log = log
class Analyzer(object):
- '''Base class for a gst tracer analyzer.'''
+ """
+ Base class for a gst tracer analyzer.
+
+ Will be used in conjunction with a AnalysisRunner.
+ """
def __init__(self):
pass
class Parser(object):
- '''Helper to parse a tracer log'''
+ """
+ Helper to parse a tracer log.
+
+ Implements context manager and iterator.
+ """
# record fields
F_TIME = 0
)
class Structure(object):
- '''Gst Structure parser.'''
+ """
+ Gst Structure parser.
+
+ Has publicly accesible members representing the structure data:
+ name -- the structure name
+ types -- a dictionary keyed by the field name
+ values -- a dictionary keyed by the field name
+ """
def __init__(self, text):
self.text = text