3 use DebugBar\DataCollector\AssetProvider;
4 use DebugBar\DataCollector\DataCollector;
5 use DebugBar\DataCollector\Renderable;
6 use DebugBar\DebugBarException;
42 $totalMemoryUsage = 0;
44 foreach ($this->
db->queries as $query) {
46 'sql' => $query[
'sql'],
47 'duration' => $query[
'duration'],
48 'duration_str' => round($query[
'duration'] * 1000, 2),
49 'memory' => $query[
'memory_usage'],
50 'is_success' => $query[
'is_success'],
51 'error_code' => $query[
'error_code'],
52 'error_message' => $query[
'error_message']
54 $totalExecTime += $query[
'duration'];
55 $totalMemoryUsage += $query[
'memory_usage'];
56 if (!$query[
'is_success']) {
62 'nb_statements' => count($queries),
63 'nb_failed_statements' => $totalFailed,
64 'accumulated_duration' => $totalExecTime,
65 'memory_usage' => $totalMemoryUsage,
66 'statements' => $queries
89 $title = $langs->transnoentities(
'Database');
93 "icon" =>
"arrow-right",
94 "widget" =>
"PhpDebugBar.Widgets.SQLQueriesWidget",
98 "$title:badge" => array(
99 "map" =>
"query.nb_statements",
113 'css' =>
'widgets/sqlqueries/widget.css',
114 '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.
$conf db
API class for accounts.