Queue monitor
amltk.scheduling.queue_monitor
#
The queue monitoring.
QueueMonitor
#
QueueMonitor(scheduler: Scheduler)
A monitor for the scheduler queue.
Source code in src/amltk/scheduling/queue_monitor.py
df
#
Converts the data to a pandas DataFrame.
| PARAMETER | DESCRIPTION |
|---|---|
n_workers |
The number of workers that were in use. This helps idenify how many workers were idle at a given time. If None, the maximum length of the queue at any recorded time is used.
TYPE:
|
Source code in src/amltk/scheduling/queue_monitor.py
plot
#
plot(
*,
ax: Axes | None = None,
interval: tuple[int, UnitChoices] = (1, "s"),
n_workers: int | None = None,
**kwargs: Any
) -> Axes
Plots the data as a stacked barchart.
| PARAMETER | DESCRIPTION |
|---|---|
ax |
The axes to plot on. If None, a new figure is created.
TYPE:
|
interval |
The interval to use for the x-axis. The first value is the interval and the second value is the unit. Must be a valid pandas timedelta unit. See to_timedelta() for more information. |
n_workers |
The number of workers that were in use. This helps idenify how many workers were idle at a given time. If None, the maximum length of the queue at any recorded time is used.
TYPE:
|
**kwargs |
Additional keyword arguments to pass to the pandas plot function.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Axes
|
The axes. |
Source code in src/amltk/scheduling/queue_monitor.py
update
#
update(*_: Any) -> None
Updates the data when the scheduler has an event.