poolsim-core
poolsim-core is the Rust library crate for connection-pool sizing.
It is the simulation and analysis engine behind the poolsim workspace.
Scope
The current release focuses on sizing calculation, not runtime pool enforcement.
It provides:
- workload and pool validation
- latency distribution fitting
- Erlang-C helpers
- Monte Carlo queue simulation
- pool-size optimization
- sensitivity analysis
- step-load analysis
Install
[]
= "0.1.0"
Primary APIs
Use the crate-root APIs for the most common workflows:
simulate: full recommendation workflowevaluate: score a fixed pool sizesweep: generate sensitivity rows with default optionssweep_with_options: generate sensitivity rows with explicit options
Important public modules:
poolsim_core::typespoolsim_core::distributionpoolsim_core::erlangpoolsim_core::monte_carlopoolsim_core::optimizerpoolsim_core::sensitivitypoolsim_core::error
Example
use ;
let workload = WorkloadConfig ;
let pool = PoolConfig ;
let report = simulate.unwrap;
assert!;
Output
The main simulation output includes:
- recommended pool size
- confidence interval
- cold-start minimum pool size
- utilisation ratio
- queue-wait metrics
- sensitivity rows
- optional step-load analysis
- warnings
See Also
- Workspace repository: https://github.com/gregorian-09/poolsim
- Detailed library guide: https://github.com/gregorian-09/poolsim/blob/main/docs/library-api.md
- Sizing calculator guide: https://github.com/gregorian-09/poolsim/blob/main/docs/sizing-calculator.md
Notes
- For CLI usage, see the
poolsim-clicrate. - For HTTP and WebSocket usage, see the
poolsim-webcrate.