« Back to Product

Documentation

IPS_GetVariableStats

 array IPS_GetVariableStats ()

Returns

An array with the following key => value pairs:

Index Type Description
Count integer Number of variables
TotalBytes integer Estimated memory usage of the variables in bytes

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function returns the memory usage of the variables. For each variable the value, the (custom) variable profile and the (custom) presentation are taken into account.

The bytes are an estimate of the occupied memory based on the stored data structures and not an exact measurement. The value is also recorded in the series "Variables" of IPS_GetStatsHistory.

Example

// Output the memory usage of the variables
print_r(IPS_GetVariableStats());

/* e.g. returns:
Array
(
    [Count] => 1204
    [TotalBytes] => 983040
)
*/
Any questions?