Skip to main content

Module work

Module work 

Source
Expand description

Worker lifecycle traits and unified summary types.

The framework clones a *Work implementor once per worker task. Shared resources (reqwest::Client, Arc<Pool>, etc.) live in Self and remain shared across workers through Clone. Per-worker resources (dedicated connections, local buffers) live in Self::State and are created by init.

Consumer note: ConsumerWork owns its event loop — the framework calls ConsumerWork::run once per worker with a ConsumerRecorder handle for reporting consumed items.

Structs§

AsyncTaskResults
Results from an super::async_task::AsyncTaskBenchmark run.
BenchmarkResults
Results from a super::request::Benchmark run.
BenchmarkSummary
Final metrics from one role in a benchmark run.
ConsumerRecorder
A handle passed to ConsumerWork::run for reporting consumed items back to the framework.
ProducerConsumerResults
Results from a super::producer_consumer::ProducerConsumerBenchmark run.

Enums§

PollResult
Result of polling an async task.
WorkResult
Result of one request/response work unit.

Traits§

BenchmarkWork
Worker lifecycle for the request/response benchmark pattern.
ConsumerWork
Worker lifecycle for the consumer side of a producer/consumer benchmark.
PollWork
Worker lifecycle for the poll side of an async-task benchmark.
ProducerWork
Worker lifecycle for the producer side of a producer/consumer benchmark.
SubmitWork
Worker lifecycle for the submit side of an async-task benchmark.