vpoturaev 8 lat temu
rodzic
commit
b9926db606
2 zmienionych plików z 15 dodań i 10 usunięć
  1. 12 8
      README.md
  2. 3 2
      prepend_v4.php

+ 12 - 8
README.md

@@ -10,25 +10,29 @@ Profiling is started automatically with `auto_prepend_file` configuration.
 docker run --rm -v $(pwd):/code phperf/php-profiler php test_me.php
 ```
 
-After your script is finished `xhprof` report will be saved:
+After your script is finished `xhprof` report and SVG graph will be saved:
 ```
-Saving report to xhprof_report.1517907620.7139.serialized
+Nodes in report: 33
+Saving report to xhprof_report.1517989322.4259.serialized
+Generating dot script
+Generating dot image
+Saving graph to xhprof_report.1517989322.4259.serialized.svg
 ```
 
-You can upload it to https://blackfire.io (cli tool needed) for analysis
+You can upload report to https://blackfire.io (cli tool needed) for analysis
 ```
-blackfire upload xhprof_report.1517907620.7139.serialized
+blackfire upload xhprof_report.1517989322.4259.serialized
 ```
 
 ```
 Blackfire upload completed
-Graph URL https://blackfire.io/profiles/e4372950-a0a6-407a-95e2-a939e40dade2/graph
+Graph URL https://blackfire.io/profiles/bec67f2b-b1eb-459f-b392-97a69ea025d9/graph
 No tests! Create some now https://blackfire.io/docs/cookbooks/tests
 No recommendations
 
-Wall Time     2.93s
-CPU Time      2.91s
-I/O Time     16.3ms
+Wall Time     314ms
+CPU Time      308ms
+I/O Time     5.31ms
 Memory       47.4KB
 Network         n/a     n/a       -
 SQL             n/a       -

+ 3 - 2
prepend_v4.php

@@ -1,7 +1,5 @@
 <?php
 
-tideways_enable(TIDEWAYS_FLAGS_MEMORY | TIDEWAYS_FLAGS_CPU);
-
 register_shutdown_function(
     function () {
         register_shutdown_function(function () {
@@ -31,3 +29,6 @@ register_shutdown_function(
         });
     }
 );
+
+tideways_enable(TIDEWAYS_FLAGS_MEMORY | TIDEWAYS_FLAGS_CPU);
+