longxinH / xhprof-apm

Xhprof APM
Apache License 2.0
36 stars 10 forks source link

sql过长会被截取 , 函数名 过长也会进行截取 源数据那边做了截取处理,可否不要截取 #14

Closed 12gameRensheng closed 3 years ago

12gameRensheng commented 3 years ago

如图所示 : sql过长会被截取 , 函数名 过长也会进行截取 源数据那边做了截取处理,可否不要截取 image

longxinH commented 3 years ago

在xhprof已经做过不限制字符长度的尝试,当出现很长的字符串的时候,会出现内存溢出,导致段错误。commit

longxinH commented 3 years ago

目前是限制512,可以适当的加大限制范围

12gameRensheng commented 3 years ago

大佬你好 因为我不懂c代码 可以弄成一个配置吗 默认就是512 读取apm.ini 或者 php.ini里面的配置进行

longxinH commented 3 years ago

提议不错,我这边修改一下

12gameRensheng commented 3 years ago

大佬 你修改代码时 能不能顺便把我提的 那个 每个函数里面也加一个作者 如果有读取处理 格式就统一按照php的注释规范 格式如下:* @author liangdabiao 如下图所示 https://github.com/longxinH/xhprof-apm/issues/13

12gameRensheng commented 3 years ago

管理ui界面 我愿意花时间完善下 作者的参数 和进行PR

longxinH commented 3 years ago

我看了代码,mysql没有截取的,看一下是不是php输出的时候截取了。

12gameRensheng commented 3 years ago

大佬 我目前测试当函数名超过502 扩展里面会自动截取处理。 例子如下:

  1. 创建一个测试文件 image
    1. 执行代码 image
    2. export.php 处理导入代码中 做下处理 将扩展里面传递的变量 $_apm_export 存储到本地的./年_月_日_时_分_秒.json 文件 image
    3. 打开json文件 查看 函数t1的结尾数字对上了 但是函数z1的结尾数字对不上 image image
longxinH commented 3 years ago

最新版本支持设置长度,apm.scratch_buf = 1024

12gameRensheng commented 3 years ago

感谢 大佬 我现在试试

12gameRensheng commented 3 years ago

感谢大佬 已经可以了 image

longxinH commented 3 years ago

apm.scratch_buf 不建议设置过大