lisa.trace.ComposedCollector#

class lisa.trace.ComposedCollector(collectors)[source]#

Bases: Mapping

Compose multiple lisa.trace.CollectorBase together.

When used as a context manager, collectors will be nested. Individual collectors can be retrieved by using the instance as a mapping, using the collectors’ NAME attribute as key.

Note

Only one collector of each type is allowed. This allows:

Attributes

__reversed__ inherited

See collections.abc.Mapping.__reversed__

Methods

__enter__()

__exit__()

__getitem__()

__iter__()

__len__()

__class_getitem__() inherited

See collections.abc.Iterable.__class_getitem__()

__contains__() inherited

See collections.abc.Mapping.__contains__()

get() inherited

See collections.abc.Mapping.get()

items() inherited

See collections.abc.Mapping.items()

keys() inherited

See collections.abc.Mapping.keys()

values() inherited

See collections.abc.Mapping.values()

Attributes#

ComposedCollector.__reversed__ = None#

Methods#

ComposedCollector.__enter__()[source]#
ComposedCollector.__exit__(*args, **kwargs)[source]#
ComposedCollector.__getitem__(key)[source]#
ComposedCollector.__iter__()[source]#
ComposedCollector.__len__()[source]#
classmethod ComposedCollector.__class_getitem__()#

Inherited method, see collections.abc.Iterable.__class_getitem__()

ComposedCollector.__contains__(key)#

Inherited method, see collections.abc.Mapping.__contains__()

ComposedCollector.get(k[, d]) D[k] if k in D, else d.  d defaults to None.#

Inherited method, see collections.abc.Mapping.get()

ComposedCollector.items() a set-like object providing a view on D's items#

Inherited method, see collections.abc.Mapping.items()

ComposedCollector.keys() a set-like object providing a view on D's keys#

Inherited method, see collections.abc.Mapping.keys()

ComposedCollector.values() an object providing a view on D's values#

Inherited method, see collections.abc.Mapping.values()