mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-21 05:26:23 +00:00
tracer: update docstrings
This commit is contained in:
parent
64ce582313
commit
52ce3ef666
4 changed files with 23 additions and 4 deletions
|
@ -2,7 +2,11 @@ from tracer.parser import Parser
|
|||
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
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
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
|
||||
|
|
|
@ -37,7 +37,11 @@ def _log_line_regex():
|
|||
|
||||
|
||||
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
|
||||
|
|
|
@ -10,7 +10,14 @@ INT_TYPES = "".join(
|
|||
)
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue