TracerHook¶
- class passengersim.callbacks.base.TracerHook(tracer: GenericTracer, hook: str)[source]¶
Bases:
objectOne hook method of a tracer, as registered on that hook.
A tracer written with
on_<hook>methods is registered once per hook, each registration holding one of these. All of them call the same tracer object, so the tracer’s state is never split across copies. Thepriorityandskip_burnsettings are read from the tracer, so the scheduler and dispatcher treat this exactly like a legacy tracer.A tracer has one
priority, which times all of its queued hooks (begin_sample,daily, andend_sample) alike, so it observes every DCP from the same side of the RM systems and bookkeeping. Where two of its hooks share a timestamp (the first DCP’s begin-sample and daily calls, or the final DCP’s daily and end-sample calls), they run in lifecycle order, as all callbacks sharing a timestamp do (seeCallbackMixin.add_callback_events()).Methods
__init__(tracer, hook)Attributes
The lifecycle hook this method runs on.
The tracer whose method is called.
The tracer's offset in seconds, read when events are scheduled.
Whether the tracer is skipped during burn-in samples.
- tracer¶
The tracer whose method is called.
- hook¶
The lifecycle hook this method runs on.
- property priority : Any¶
The tracer’s offset in seconds, read when events are scheduled.
- property skip_burn : bool¶
Whether the tracer is skipped during burn-in samples.