def __init__(self, session_factory, policy, options): self.policy = policy self.options = options self.session_factory = session_factory # Runtime initialized during policy execution # We treat policies as a fly weight pre-execution. self.start_time = None self.execution_id = None self.output = None self.api_stats = None self.sys_stats = None # A few tests patch on metrics flush self.metrics = metrics_outputs.select(self.options.metrics_enabled, self) # Tracer is wired into core filtering code / which is getting # invoked sans execution context entry in tests self.tracer = tracer_outputs.select(self.options.tracer, self)
def __init__(self, session_factory, policy, options): self.policy = policy self.options = options self.session_factory = session_factory # Runtime initialized during policy execution # We treat policies as a fly weight pre-execution. self.start_time = None self.execution_id = None self.output = None self.logs = None self.api_stats = None self.sys_stats = None # A few tests patch on metrics flush # For backward compatibility, accept both 'metrics' and 'metrics_enabled' params (PR #4361) metrics = self.options.metrics or self.options.metrics_enabled self.metrics = metrics_outputs.select(metrics, self) # Tracer is wired into core filtering code / which is getting # invoked sans execution context entry in tests self.tracer = tracer_outputs.select(self.options.tracer, self)