26use DebugBar\DataCollector\AssetProvider;
27use DebugBar\DataCollector\DataCollector;
28use DebugBar\DataCollector\Renderable;
64 $totalMemoryUsage = 0;
66 foreach ($this->db->queries as $query) {
68 'sql' => $query[
'sql'],
69 'duration' => $query[
'duration'],
70 'duration_str' => round((
float) $query[
'duration'] * 1000, 2),
71 'memory' => $query[
'memory_usage'],
72 'is_success' => $query[
'is_success'],
73 'error_code' => $query[
'error_code'],
74 'error_message' => $query[
'error_message']
76 $totalExecTime += $query[
'duration'];
77 $totalMemoryUsage += $query[
'memory_usage'];
78 if (!$query[
'is_success']) {
84 'nb_statements' => count($queries),
85 'nb_failed_statements' => $totalFailed,
86 'accumulated_duration' => $totalExecTime,
87 'memory_usage' => $totalMemoryUsage,
88 'statements' => $queries
111 $title = $langs->transnoentities(
'Database');
115 "icon" =>
"arrow-right",
116 "widget" =>
"PhpDebugBar.Widgets.SQLQueriesWidget",
120 "$title:badge" => array(
121 "map" =>
"query.nb_statements",
135 'css' =>
'widgets/sqlqueries/widget.css',
136 'js' =>
'widgets/sqlqueries/widget.js'
getWidgets()
Return widget settings.
collect()
Return collected data.
__construct()
Constructor.
getName()
Return collector name.
getAssets()
Return assets.
if(!function_exists( 'dol_getprefix')) dol_include_once($relpath, $classname='')
Make an include_once using default root and alternate root if it fails.