Source code for DikeBenchmarker.resultconsumers.then_result_consumer

"""
ThenResultConsumer for benchmarking results.
"""

from DikeBenchmarker.benchmarkatoms import Result
from DikeBenchmarker.resultconsumers.abstract_consumer import AbstractConsumer

__all__ = ["ThenResultConsumer"]


[docs] class ThenResultConsumer(AbstractConsumer): """Applies a series of result consumer in order""" def __init__(self, consumers: list[AbstractConsumer]): super().__init__() self.consumers = consumers
[docs] def consume_result(self, result: Result): for consumer in self.consumers: consumer.consume_result(result)