|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: dmitry dot koterov at gmail dot com
New email:
PHP Version: OS:


 [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: Mon Oct 18 21:03:39 2021 UTC