|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58797 Add compilation time statistic
Submitted: 2009-08-07 16:00 UTC Modified: 2017-10-24 08:24 UTC
From: dmitry dot koterov at gmail dot com Assigned:
Status: Suspended Package: xhprof (PECL)
PHP Version: 5_2 CVS-2009-08-07 (dev) OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
38 - 6 = ?
Subscribe to this entry?

 [2009-08-07 16:00 UTC] dmitry dot koterov at gmail dot com
One of the greatest feature of xhprof is PHP script compilation time logging. So I could notice how much time PHP was compiling my code.

But overall statistics about compilation time is not displayed. Below is the patch which displays "Compilation time" value within the top "Overall Summary" block. I'll be pleased if you apply it in a next version.

Index: xhprof_lib/display/xhprof.php
--- xhprof_lib/display/xhprof.php	(revision 14556)
+++ xhprof_lib/display/xhprof.php	(working copy)
@@ -938,6 +938,19 @@
     if ($display_calls) {
+      $time = 0;
+      foreach ($symbol_tab as $k => $sym) {
+        if (0 === strpos($k, 'load::')) {
+          $time += floatval($sym['wt']);
+        }
+      }
+      echo "<tr>";
+      echo "<td style='text-align:right; font-weight:bold'>Compilation Time:</td>";
+      echo "<td>" . number_format($time) . " microsecs</td>";
+      echo "</tr>";
+    }
+    if ($display_calls) {
       echo "<tr>";
       echo "<td style='text-align:right; font-weight:bold'>Number of Function Calls:</td>";
       echo "<td>" . number_format($totals['ct']) . "</td>"; "</td>";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-12 18:01 UTC]
-Assigned To: +Assigned To: scottmac
 [2017-10-24 06:13 UTC]
-Status: Assigned +Status: Open -Assigned To: scottmac +Assigned To:
 [2017-10-24 08:24 UTC]
-Status: Open +Status: Suspended
 [2017-10-24 08:24 UTC]
This package has not had a release for over 4 years, and the last bit of git activity was over 2 years ago, so I think its safe to say this extension is no longer in active development. If development picks back up, then please re-open this report
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Oct 17 10:03:37 2021 UTC