24use DebugBar\DataCollector\AssetProvider;
25use DebugBar\DataCollector\DataCollector;
26use DebugBar\DataCollector\Renderable;
27use DebugBar\DebugBarException;
63 $totalMemoryUsage = 0;
65 foreach ($this->db->queries as $query) {
67 'sql' => $query[
'sql'],
68 'duration' => $query[
'duration'],
69 'duration_str' => round($query[
'duration'] * 1000, 2),
70 'memory' => $query[
'memory_usage'],
71 'is_success' => $query[
'is_success'],
72 'error_code' => $query[
'error_code'],
73 'error_message' => $query[
'error_message']
75 $totalExecTime += $query[
'duration'];
76 $totalMemoryUsage += $query[
'memory_usage'];
77 if (!$query[
'is_success']) {
83 'nb_statements' => count($queries),
84 'nb_failed_statements' => $totalFailed,
85 'accumulated_duration' => $totalExecTime,
86 'memory_usage' => $totalMemoryUsage,
87 'statements' => $queries
110 $title = $langs->transnoentities(
'Database');
114 "icon" =>
"arrow-right",
115 "widget" =>
"PhpDebugBar.Widgets.SQLQueriesWidget",
119 "$title:badge" => array(
120 "map" =>
"query.nb_statements",
134 'css' =>
'widgets/sqlqueries/widget.css',
135 '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.