GetAllPoolInfo
This function was added in DSL 6
Description
Returns a table containing more tables with info about each individual pool.
Each table in the returned table contain 4 fields: name
, size
, limit
, and count
.
It is worth noting that the names of pools in the table do not directly match the names expected by GetPoolSize
.
function GetAllPoolInfo(pool) --[[ ... ]] end
Parameters
pool?
:string|nil
- The name of the pool to get the size of. This is case-sensitive and must match the pool name exactly. See the list of available pools. If not provided, it will return info for all pools.
Return Values
info
:table[]
- A table containing info about the specified pool or all pools if no pool is specified. Each table in the returned table contains the following fields:name
:string
- The name of the pool.count
:integer
- The number of elements currently used in the pool.limit
:integer
- The current limit of the pool (usually equal to size).size
:integer
- The maximum number of elements allowed in the pool.
Example
Print all pool info.
for index, pool in pairs(GetAllPoolInfo()) do
for key, value in pairs(pool) do
print(key .. ': ' .. value)
end
print('---', index)
end