Package DE_EPAGES::Core::API::Statistics
Provides an API for performance analysis
@EXPORT_OK |
Functions
GetStatisticString
returns the statistic string of this module, adds the given vars to the message.
Syntax |
$Message = GetStatisticString($hVars); |
Example |
$Message = GetStatisticString({'IP'=>'127.0.0.1'}); |
Input |
|
Return |
|
RunStatistic
Measure clock,user,system time for this function call and return Statistic String
Syntax |
$Text = RunStatistic($Sub, $Vars); |
Example |
print RunStatistic(\&Main, { 'request'=>'uri' }); |
Input |
|
Return |
|
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 |
|
WithStatistics
Measure clock,user,system time for this function call and enables TakeStatistic.
Syntax |
$hStatistics = WithStatistics($Sub); |
Example |
print WithStatistic(\&Main, { 'request'=>'uri' }); |
Input |
|
Return |
|