# HG changeset patch
# User Dan
# Date 1201495553 18000
# Node ID 2ccb55995aefd54335054e3dddded8951bd33359
# Parent b4751b55ee92d5c8e21138676b8676f4c6b44ac5
Profiling enabled for RenderMan's wikiformat routine; [minor] made HTML from profiler more pretty
diff -r b4751b55ee92 -r 2ccb55995aef includes/functions.php
--- a/includes/functions.php Sun Jan 27 23:44:02 2008 -0500
+++ b/includes/functions.php Sun Jan 27 23:45:53 2008 -0500
@@ -4051,35 +4051,41 @@
foreach ( $profile as $i => $entry )
{
- $html .= "
Event $i |
";
+ $html .= "\n\n Event $i | \n
";
- $html .= '';
- $html .= 'Event: | ';
- $html .= '' . htmlspecialchars($entry['point']) . ' | ';
- $html .= '
';
+ $html .= '' . "\n";
+ $html .= ' Event: | ' . "\n";
+ $html .= ' ' . htmlspecialchars($entry['point']) . ' | ' . "\n";
+ $html .= '
' . "\n";
$time = $entry['time'] - $time_start;
- $html .= '';
- $html .= 'Time since start: | ';
- $html .= '' . $time . 's | ';
- $html .= '
';
+ $html .= '' . "\n";
+ $html .= ' Time since start: | ' . "\n";
+ $html .= ' ' . $time . 's | ' . "\n";
+ $html .= '
' . "\n";
$time = $entry['time'] - $time_last;
+ if ( $time < 0.0001 )
+ $time = 'Marginal';
+ else
+ $time = "{$time}s";
- $html .= '';
- $html .= 'Time since last event: | ';
- $html .= '' . $time . 's | ';
- $html .= '
';
+ $html .= '' . "\n";
+ $html .= ' Time since last event: | ' . "\n";
+ $html .= ' ' . $time . ' | ' . "\n";
+ $html .= '
' . "\n";
if ( $entry['backtrace'] )
{
- $html .= '';
- $html .= 'Called from: | ';
- $html .= '' . htmlspecialchars($entry['backtrace']) . ' | ';
- $html .= '
';
+ $html .= '' . "\n";
+ $html .= ' Called from: | ' . "\n";
+ $html .= ' ' . htmlspecialchars($entry['backtrace']) . ' | ' . "\n";
+ $html .= '
' . "\n";
}
+ $html .= "\n";
+
$time_last = $entry['time'];
}
$html .= '';
diff -r b4751b55ee92 -r 2ccb55995aef includes/render.php
--- a/includes/render.php Sun Jan 27 23:44:02 2008 -0500
+++ b/includes/render.php Sun Jan 27 23:45:53 2008 -0500
@@ -217,6 +217,8 @@
global $db, $session, $paths, $template, $plugins; // Common objects
global $lang;
+ profiler_log("RenderMan: starting wikitext render");
+
$random_id = md5( time() . mt_rand() );
// Strip out sections and PHP code
@@ -339,6 +341,8 @@
$result = str_replace('{PHP:'.$random_id.':'.$i.'}', '', $result);
}
+ profiler_log("RenderMan: finished wikitext render");
+
return $result;
}