feat(admin): XHProf 函数监控规则与命中记录

This commit is contained in:
augushong
2026-08-15 07:02:37 +08:00
parent e57b186126
commit c980ebdff0
23 changed files with 901 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ namespace app\admin\model;
use app\common\model\TimeModel;
/**
* XHProf 采样与监控规则命中聚合(导入时物化)
*
* @property int $id 主键ID
* @property int $run_id 采样记录IDul_xhprof_run.id
* @property int $watch_id 监控规则IDul_xhprof_watch.id
@@ -20,4 +22,13 @@ class XhprofRunWatch extends TimeModel
protected $deleteTime = false;
public function run()
{
return $this->belongsTo('app\admin\model\XhprofRun', 'run_id', 'id');
}
public function watch()
{
return $this->belongsTo('app\admin\model\XhprofWatch', 'watch_id', 'id');
}
}

View File

@@ -5,9 +5,11 @@ namespace app\admin\model;
use app\common\model\TimeModel;
/**
* XHProf 函数监控规则
*
* @property int $id 主键ID
* @property string $name 规则名称(人读)
* @property string $regex PCRE 正则(对被调用函数名匹配)
* @property string $regex PCRE 正则(对被调用函数名匹配,带定界符
* @property string $note 备注
* @property int $threshold_ms 比对阈值毫秒0=不比对
* @property int $status 状态:1=启用,0=禁用
@@ -21,4 +23,5 @@ class XhprofWatch extends TimeModel
protected $deleteTime = false;
public const SELECT_LIST_STATUS = ['0' => '禁用', '1' => '启用'];
}