# `Poolex.Private.DebugInfo`
[🔗](https://github.com/general-CbIC/poolex/blob/main/lib/poolex/private/debug_info.ex#L1)

Information with the current state of the pool.

Can be used for debugging.

# `t`

```elixir
@type t() :: %Poolex.Private.DebugInfo{
  busy_workers_count: non_neg_integer(),
  busy_workers_impl: module(),
  busy_workers_pids: [pid()],
  failed_to_start_workers_count: non_neg_integer(),
  idle_overflowed_workers_count: non_neg_integer(),
  idle_overflowed_workers_impl: module(),
  idle_overflowed_workers_pids: [pid()],
  idle_workers_count: non_neg_integer(),
  idle_workers_impl: module(),
  idle_workers_pids: [pid()],
  max_overflow: non_neg_integer(),
  max_pool_size: pos_integer() | :infinity,
  min_pool_size: non_neg_integer(),
  overflow: non_neg_integer(),
  total_workers_count: non_neg_integer(),
  waiting_callers: [Poolex.Caller.t()],
  waiting_callers_impl: module(),
  worker_args: [any()],
  worker_module: module(),
  worker_shutdown_delay: timeout(),
  worker_start_fun: atom()
}
```

# `get_debug_info`

```elixir
@spec get_debug_info(Poolex.pool_id()) :: t()
```

Returns detailed information about started pool.

Primarily needed to help with debugging. **Avoid using this function in production.**

## Fields

    * `busy_workers_count` - how many workers are busy right now.
    * `busy_workers_impl` - implementation of busy workers.
    * `busy_workers_pids` - list of busy workers.
    * `failed_to_start_workers_count` - how many workers failed to start.
    * `idle_overflowed_workers_count` - how many idle overflowed workers are there.
    * `idle_overflowed_workers_impl` - implementation of idle overflowed workers.
    * `idle_overflowed_workers_pids` - list of idle overflowed workers.
    * `idle_workers_count` - how many workers are ready to work.
    * `idle_workers_impl` - implementation of idle workers.
    * `idle_workers_pids` - list of idle workers.
    * `max_overflow` - how many workers can be created over the limit.
    * `overflow` - current count of workers launched over limit.
    * `waiting_caller_pids` - list of callers processes.
    * `worker_args` - what parameters are used to start the worker.
    * `worker_module` - name of a module that describes a worker.
    * `worker_shutdown_delay` - how long to wait before shutting down a worker.
    * `worker_start_fun` - what function is used to start the worker.

## Examples

    iex> Poolex.start(pool_id: :my_pool_3, worker_module: Agent, worker_args: [fn -> 0 end], workers_count: 5)
    iex> debug_info = %Poolex.Private.DebugInfo{} = Poolex.Private.DebugInfo.get_debug_info(:my_pool_3)
    iex> debug_info.busy_workers_count
    0
    iex> debug_info.idle_workers_count
    5

---

*Consult [api-reference.md](api-reference.md) for complete listing*
