ePages 6.10 - DE_EPAGES/Core/API/Statistics.pm

Package DE_EPAGES::Core::API::Statistics

Provides an API for performance analysis

@EXPORT_OK
TakeStatistic
RunStatistic

Functions

RunStatistic
TakeStatistic

RunStatistic

Measure clock,user,system time for this function call and enables TakeStatistic.

Syntax
$StatisticText = RunStatistic($Sub, $Vars);
Example
$StatisticText = RunStatistic(&Main, { 'request'=>'uri' });
Input
$Sub (code)
function pointer
$Vars (ref.hash)
variables for statistic (uri)

TakeStatistic

Measure clock,user,system time for this function call. Use RunStatistic to enable measurement.

Syntax
TakeStatistic($Key, $Sub);
Example
TakeStatistic('Addition', sub { my $test = 0; $test++; $test += 1221; });
Input
$Key (string)
statistic key
$Sub (code)
function pointer