Buffer v0.2.0 Buffer.InstrumentedQueue View Source
An instumented FIFO queue
Link to this section Summary
Functions
Creates a new empty queue. Can pass a module that implements the underlying Buffer
behaviour.
Pops count
items from the buffer. Returns {items, buffer}
. If there are less than count
items in the buffer all items are popped.
Pushes items into the buffer and returns the buffer
Returns the elapsed time that the item at the head of the queue has been queued for
If there is nothing in the queue, nil
is returned
Returns the number of items in the buffer
Link to this section Functions
Creates a new empty queue. Can pass a module that implements the underlying Buffer
behaviour.
Pops count
items from the buffer. Returns {items, buffer}
. If there are less than count
items in the buffer all items are popped.
Callback implementation for Buffer.pop/2
.
Pushes items into the buffer and returns the buffer
Callback implementation for Buffer.push/2
.
queueing_time(state, time_unit \\ :second)
View Sourcequeueing_time(Buffer.t(), System.time_unit()) :: integer()
Returns the elapsed time that the item at the head of the queue has been queued for
If there is nothing in the queue, nil
is returned
Returns the number of items in the buffer
Callback implementation for Buffer.size/1
.