This script displays genxref's performance statistics for the various versions of the tree.
duration ($start, $end)
Function duration
returns a human-readable string for the time difference between its arguments.
$start
an integer containing the number of seconds since the epoch for the beginning of the interval
$end
an integer containing the number of seconds since the epoch for the end of the interval
If the end date is negative, an error occurred during the interval.
If the start date is negative, the step was skipped.
rowclass ($templ, $line)
Function rowclass
is the "$variable" substitution function for lineclass
. It returns a CSS class name depending on line parity.
$templ
a string containing the template (empty for a "variable")
$line
an integer containing the line number of the display
onelineexpand ($temp, $reindex, @versions)
Function onelineexpand
is a "$function" substitution function. It returns its template expanded for every line matching its second argument.
$templ
a string containing the template
$reindex
the full reindex flag as 0 or 1 to select the proper values
@versions
an array containing the versions (release-ids) for which performance data must be edited.
It fetches performance data for the elements of its second argument.
perfdataexpand ($templ, $reindex)
Function perfdataexpand
is a "$function" substitution function for perffull
. It returns its template argument expanded for every line in the DB selection.
$templ
a string containing the template
$reindex
the full reindex flag as 0 or 1 to select the proper values
It fetches versions involved in purgeing indexations.
The "line" is expanded by a common procedure.
perffpurgeexpand ($templ)
Function perffpurgeexpand
is a "$function" substitution function for perffullpurge
. It returns its template argument expanded for the line corresponding to a full purge (column releaseid
is a null string).
$templ
a string containing the template
It fetches the null version used to store full purge timing.
The "line" is expanded by a common procedure.
getserial ()
and getelapsed ()
These helper functions work around random adverse effect caused by a possible optimisation in mod_perl. Transferring correct computed value of $totalserialtime
or $totalelapsed
to anonymous sub
s requires late binding. It looks like sometimes early binding is used, leading to the variables initial value instead of fetching the current value.
Replacing reference to the variables by a function seems to cure the problem.
Selects the correct header and footer, retrieves the 'htmlperf'
template and launches template expansion.
The script does not use any query argument, however they are managed as usual which allows to switch to other scripts with variables set as desired.