function xhprof_stat_description in XHProf 6
Same name and namespace in other branches
- 7 xhprof.inc \xhprof_stat_description()
Get the appropriate description for a statistic (depending upon whether we are in diff report mode or single run report mode).
@author Kannan
8 calls to xhprof_stat_description()
- theme_xhprof_overall_summary in ./
xhprof.module - Theme function to display XHProf run summary.
- theme_xhprof_run_table in ./
xhprof.module - Theme function to display list of XHProf function calls.
- xhprof_displayXHProfReport in ./
xhprof.inc - Generate a XHProf Display View given the various URL parameters as arguments. The first argument is an object that implements the iXHProfRuns interface.
- xhprof_display_run in ./
xhprof.module - Display XHProf run report.
- xhprof_full_report in ./
xhprof.inc - Generates a tabular report for all functions. This is the top-level report.
File
- ./
xhprof.inc, line 484
Code
function xhprof_stat_description($stat, $desc = FALSE) {
global $diff_mode;
// Textual descriptions for column headers in "single run" mode
$descriptions = array(
"fn" => "Function Name",
"ct" => "Calls",
"Calls%" => "Calls%",
"wt" => "Incl. Wall Time (microsec)",
"IWall%" => "IWall%",
"excl_wt" => "Excl. Wall Time (microsec)",
"EWall%" => "EWall%",
"ut" => "Incl. User (microsecs)",
"IUser%" => "IUser%",
"excl_ut" => "Excl. User (microsec)",
"EUser%" => "EUser%",
"st" => "Incl. Sys (microsec)",
"ISys%" => "ISys%",
"excl_st" => "Excl. Sys (microsec)",
"ESys%" => "ESys%",
"cpu" => "Incl. CPU (microsecs)",
"ICpu%" => "ICpu%",
"excl_cpu" => "Excl. CPU (microsec)",
"ECpu%" => "ECPU%",
"mu" => "Incl. MemUse (bytes)",
"IMUse%" => "IMemUse%",
"excl_mu" => "Excl. MemUse (bytes)",
"EMUse%" => "EMemUse%",
"pmu" => "Incl. PeakMemUse (bytes)",
"IPMUse%" => "IPeakMemUse%",
"excl_pmu" => "Excl. PeakMemUse (bytes)",
"EPMUse%" => "EPeakMemUse%",
"samples" => "Incl. Samples",
"ISamples%" => "ISamples%",
"excl_samples" => "Excl. Samples",
"ESamples%" => "ESamples%",
);
// Textual descriptions for column headers in "diff" mode
$diff_descriptions = array(
"fn" => "Function Name",
"ct" => "Calls Diff",
"Calls%" => "Calls Diff%",
"wt" => "Incl. Wall Diff (microsec)",
"IWall%" => "IWall Diff%",
"excl_wt" => "Excl. Wall Diff (microsec)",
"EWall%" => "EWall Diff%",
"ut" => "Incl. User Diff (microsec)",
"IUser%" => "IUser Diff%",
"excl_ut" => "Excl. User Diff (microsec)",
"EUser%" => "EUser Diff%",
"cpu" => "Incl. CPU Diff (microsec)",
"ICpu%" => "ICpu Diff%",
"excl_cpu" => "Excl. CPU Diff (microsec)",
"ECpu%" => "ECpu Diff%",
"st" => "Incl. Sys Diff (microsec)",
"ISys%" => "ISys Diff%",
"excl_st" => "Excl. Sys Diff (microsec)",
"ESys%" => "ESys Diff%",
"mu" => "Incl. MemUse Diff (bytes)",
"IMUse%" => "IMemUse Diff%",
"excl_mu" => "Excl. MemUse Diff (bytes)",
"EMUse%" => "EMemUse Diff%",
"pmu" => "Incl. PeakMemUse Diff (bytes)",
"IPMUse%" => "IPeakMemUse Diff%",
"excl_pmu" => "Excl. PeakMemUse Diff (bytes)",
"EPMUse%" => "EPeakMemUse Diff%",
"samples" => "Incl. Samples Diff",
"ISamples%" => "ISamples Diff%",
"excl_samples" => "Excl. Samples Diff",
"ESamples%" => "ESamples Diff%",
);
if ($diff_mode) {
if ($desc) {
$diff_descriptions = array_flip($diff_descriptions);
}
return $diff_descriptions[$stat];
}
else {
if ($desc) {
$descriptions = array_flip($descriptions);
}
return $descriptions[$stat];
}
}