MCPcopy Create free account

hub / github.com/Skepfyr/little-loadshedder / functions

Functions21 in github.com/Skepfyr/little-loadshedder

↓ 2 callersMethodforget
Forget the permit, essentially reducing the size of the semaphore by one. Note this does still decrement the size metric.
src/lib.rs:268
↓ 2 callersMethodlayer
(&self, inner: Inner)
src/lib.rs:426
↓ 2 callersMethodsend_req
(&self)
examples/client.rs:65
↓ 1 callersFunctionload
(mut rps: Receiver<u64>, client: Client)
examples/client.rs:136
↓ 1 callersMethodstart
Add ourselves to the queue and wait until we've made it through and have obtained a permit to send the request.
src/lib.rs:107
↓ 1 callersMethodstop
Register a completed call of the inner service, providing the latency to update the statistics.
src/lib.rs:165
↓ 1 callersFunctionuser_input
(rps: Sender<u64>, client: Client)
examples/client.rs:81
Methodaverage_latency
The current average latency of requests through the inner service, that is ignoring the queue this service adds.
src/lib.rs:326
Methodcall
(&mut self, req: Request)
src/lib.rs:377
Methodcall
(&mut self, _req: Request<Body>)
examples/microservice.rs:102
Methodconcurrency
The current maximum concurrency of requests to the inner service.
src/lib.rs:331
Methoddrop
(&mut self)
src/lib.rs:274
Functionmain
()
examples/microservice.rs:30
Functionmain
()
examples/client.rs:26
Methodnew
(ewma_param: f64, target: f64)
src/lib.rs:79
Methodnew
(multiplier: Receiver<f64>)
examples/microservice.rs:84
Methodnew
(uri: Uri)
examples/client.rs:58
Methodpoll_ready
Always ready because there's a queue between this service and the inner one.
src/lib.rs:373
Methodpoll_ready
(&mut self, _cx: &mut Context<'_>)
examples/microservice.rs:98
Methodqueue_capacity
The current maximum capacity of this service (including the queue).
src/lib.rs:336
Methodqueue_len
The current number of requests that have been accepted by this service.
src/lib.rs:342