xhprof代码添加分析性能
2024-10-06 16:50:53
<?php
xhprof_enable(
XHPROF_FLAGS_MEMORY,
[
'ignored_functions' => [
//'call_user_func',
//'call_user_func_array'
]
]
); //逻辑代码
//...... $xhprofData = xhprof_disable();// $xhprofData是数组形式的分析结果 require '../xhprof_lib/utils/xhprof_lib.php';
require '../xhprof_lib/utils/xhprof_runs.php'; $xhprofRuns = new XHProfRuns_Default();
$runId = $xhprofRuns->save_run($xhprofData, 'xhprof_test'); $profile_url = 'http://10.10.20.3/xhprof_html/index.php?run=' . $runId . '&source=xhprof_test';
echo '<a href="'.$profile_url.'" target="_blank">性能链接</a>';
最新文章
- Vim配置文件
- Servlet 之 ServletContext
- block,inline和inline-block概念和区别(转)
- ACM题目————网格动物
- 【英语】Bingo口语笔记(59) - 穿着的表达
- HTML系列(六):划分文档结构
- SIX GOD
- 初探JavaScript魅力(五)
- Python os模块--路径、文件、系统命令等操作
- zeroc
- 痞子衡嵌入式:飞思卡尔i.MX RT系列MCU启动那些事(13)- 从Serial(1-bit SPI) EEPROM/NOR恢复启动
- 【ZCTF】easy reverse 详解
- Windows安装PostgreSQL11.1
- sga 操作命令
- JavaScript <;script>;标签的位置、延迟脚本(defer属性)与 异步脚本(async属性)
- http接口测试工具——RESTClient
- Java对象的强、软、弱和虚引用+ReferenceQueue
- Java8新特性 -- 四大内置的核心函数式接口
- linux -- 服务开机自启动
- 「WC2006」水管局长