* [misc] add php version to zin perf data.

This commit is contained in:
sunhao
2024-11-01 14:30:59 +08:00
committed by 谢杞钰
parent cdc0f24ed3
commit 57c7320abb
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -46,7 +46,8 @@ class trace
'querys' => count(dao::$querys),
'caches' => 0,
'files' => count(get_included_files()),
'session' => session_id()
'session' => session_id(),
'php' => phpversion()
);
}
+2
View File
@@ -153,6 +153,7 @@ function initTable(data)
}},
{name: 'userEnv.browser', title: 'Client Browser', sort: true, align: 'left', headerGroup: 'Frontend'},
{name: 'userEnv.system', title: 'Client OS', sort: true, align: 'center', headerGroup: 'Frontend'},
{name: 'request.php', title: 'PHP', hint: true, width: 40},
{name: 'request.xhprof', title: 'Xhprof', link: (info) => ({url: info.row.data.request.xhprof || '#', target: '_blank'}), format: (value) => (value ? 'Open' : ''), hint: true, width: 40},
{name: 'requestId', title: 'RID', hint: true, width: 80, cellClass: 'font-mono text-sm select-all', hint: info => info.row.data.requestId, flex: 0, align: 'left', fixed: 'right'},
{name: 'timestamp', title: 'Date', type: 'datetime', hint: (info) => zui.formatDate(info.row.data.timestamp, 'yyyy-MM-dd hh:mm:ss'), width: 120, sort: 'number', fixed: 'right'},
@@ -192,6 +193,7 @@ function initTable(data)
row['userEnv.browser'] = row.userEnv.browser;
row['userEnv.system'] = row.userEnv.system;
row['request.xhprof'] = row.request.xhprof;
row['request.php'] = row.request.php;
const totalTimeClass = getTimeClass(row.metrics.backend.totalTime || 0, 500, 300);
const sqlTimeClass = getTimeClass(row.metrics.backend.sqlTime || 0, 300, 200);