File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ XHProf is a function-level hierarchical profiler for PHP and has a simple HTML b
33
44This version supports PHP7
55
6- #Installation
6+ # Installation
77```
88git clone https://github.com/longxinH/xhprof.git ./xhprof
99cd xhprof/extension/
@@ -12,15 +12,15 @@ cd xhprof/extension/
1212make && sudo make install
1313```
1414
15- ####configuration add to your php.ini
15+ #### configuration add to your php.ini
1616```
1717[xhprof]
1818extension = xhprof.so
1919xhprof.output_dir = /tmp/xhprof
2020```
2121
22- #新增
23- ####pdo占位符转换
22+ # 新增
23+ #### pdo占位符转换
2424pdo预处理占位符将会转换成实际的参数,更好的掌握mysql执行消耗(只用做xhprof记录,不改变程序执行过程)
2525``` php
2626$_sth = $db->prepare("SELECT * FROM user where userid = :id and username = :name");
@@ -31,21 +31,21 @@ $_sth = $db->prepare("SELECT * FROM user where userid = ?");
3131$_sth->execute([1]);
3232$data2 = $_sth->fetch();
3333```
34- #####xhprof记录数据
34+ ##### xhprof记录数据
3535```
3636PDOStatement::execute#SELECT * FROM user where userid = 1 and username = admin
3737
3838PDOStatement::execute#SELECT * FROM user where userid = 1
3939```
4040
41- ####curl地址记录
41+ #### curl地址记录
4242``` php
4343$ch = curl_init();
4444curl_setopt($ch, CURLOPT_URL, "http://www.baidu.com");
4545$output = curl_exec($ch);
4646curl_close($ch);
4747```
48- #####xhprof记录数据
48+ ##### xhprof记录数据
4949```
5050curl_exec#http://www.baidu.com
5151```
You can’t perform that action at this time.
0 commit comments