mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-09-05 15:25:31 +08:00
feat(admin): XHProf 性能日志五张表 Scheme 迁移与模型
This commit is contained in:
27
app/admin/model/XhprofLogPosition.php
Normal file
27
app/admin/model/XhprofLogPosition.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id 主键ID
|
||||
* @property string $node_id 节点ID(区分不同采集节点)
|
||||
* @property string $file_path 日志文件绝对路径
|
||||
* @property int $inode 文件 inode,用于检测日志轮转
|
||||
* @property int $offset 上次读取到的字节偏移
|
||||
* @property int $last_read_time 上次读取时间戳
|
||||
* @property string $last_line_hash 上次最后一行的 md5 哈希(容错校验)
|
||||
* @property int $parse_fail_count 解析失败累计次数
|
||||
* @property string $parse_fail_samples 解析失败样本行(最多保留若干条)
|
||||
* @property int $create_time 创建时间戳
|
||||
* @property int $update_time 更新时间戳
|
||||
*/
|
||||
class XhprofLogPosition extends TimeModel
|
||||
{
|
||||
|
||||
protected $name = "xhprof_log_position";
|
||||
|
||||
protected $deleteTime = false;
|
||||
|
||||
}
|
||||
26
app/admin/model/XhprofRun.php
Normal file
26
app/admin/model/XhprofRun.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id 主键ID
|
||||
* @property string $node_id 节点ID(区分不同采集节点)
|
||||
* @property string $url 请求完整 URL(超长截断)
|
||||
* @property string $simple_url 规范化 URL(去 query、数字段替换,聚合用)
|
||||
* @property string $method HTTP 方法
|
||||
* @property int $wall_time 总耗时(微秒,main() 的 wt)
|
||||
* @property int $cpu_time CPU 耗时(微秒,main() 的 cpu)
|
||||
* @property int $memory_peak 内存峰值(字节,main() 的 pmu)
|
||||
* @property string $request_time 请求开始时间(REQUEST_TIME_FLOAT 浮点秒)
|
||||
* @property int $create_time 入库时间戳
|
||||
*/
|
||||
class XhprofRun extends TimeModel
|
||||
{
|
||||
|
||||
protected $name = "xhprof_run";
|
||||
|
||||
protected $deleteTime = false;
|
||||
|
||||
}
|
||||
18
app/admin/model/XhprofRunDetail.php
Normal file
18
app/admin/model/XhprofRunDetail.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id 主键,值=ul_xhprof_run.id(不自增)
|
||||
* @property string $profile_data 原始 profile JSON
|
||||
*/
|
||||
class XhprofRunDetail extends TimeModel
|
||||
{
|
||||
|
||||
protected $name = "xhprof_run_detail";
|
||||
|
||||
protected $deleteTime = false;
|
||||
|
||||
}
|
||||
23
app/admin/model/XhprofRunWatch.php
Normal file
23
app/admin/model/XhprofRunWatch.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id 主键ID
|
||||
* @property int $run_id 采样记录ID(ul_xhprof_run.id)
|
||||
* @property int $watch_id 监控规则ID(ul_xhprof_watch.id)
|
||||
* @property int $ct 命中边次数和
|
||||
* @property int $wt_sum 命中耗时合计(微秒)
|
||||
* @property int $wt_max 命中单次最大耗时(微秒)
|
||||
* @property int $create_time 入库时间戳
|
||||
*/
|
||||
class XhprofRunWatch extends TimeModel
|
||||
{
|
||||
|
||||
protected $name = "xhprof_run_watch";
|
||||
|
||||
protected $deleteTime = false;
|
||||
|
||||
}
|
||||
24
app/admin/model/XhprofWatch.php
Normal file
24
app/admin/model/XhprofWatch.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\model\TimeModel;
|
||||
|
||||
/**
|
||||
* @property int $id 主键ID
|
||||
* @property string $name 规则名称(人读)
|
||||
* @property string $regex PCRE 正则(对被调用函数名匹配)
|
||||
* @property string $note 备注
|
||||
* @property int $threshold_ms 比对阈值(毫秒),0=不比对
|
||||
* @property int $status 状态:1=启用,0=禁用
|
||||
* @property int $create_time 创建时间戳
|
||||
* @property int $update_time 更新时间戳
|
||||
*/
|
||||
class XhprofWatch extends TimeModel
|
||||
{
|
||||
|
||||
protected $name = "xhprof_watch";
|
||||
|
||||
protected $deleteTime = false;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user