mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-22 16:33:00 +00:00
Converted performance timeing comments and headers to use milliseconds
This commit is contained in:
parent
e86c67dcad
commit
1bf49fe6ae
4 changed files with 9 additions and 9 deletions
|
@ -925,7 +925,7 @@ else
|
||||||
{
|
{
|
||||||
$pageindex_read_start = microtime(true);
|
$pageindex_read_start = microtime(true);
|
||||||
$pageindex = json_decode(file_get_contents($paths->pageindex));
|
$pageindex = json_decode(file_get_contents($paths->pageindex));
|
||||||
header("x-pageindex-decode-time: " . round(microtime(true) - $pageindex_read_start, 6) . "ms");
|
header("x-pageindex-decode-time: " . round((microtime(true) - $pageindex_read_start)*1000, 3) . "ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
@ -1072,7 +1072,7 @@ class page_renderer
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{body}
|
{body}
|
||||||
<!-- Took {generation-time-taken} seconds to generate -->
|
<!-- Took {generation-time-taken}ms to generate -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
";
|
||||||
|
@ -1191,7 +1191,7 @@ class page_renderer
|
||||||
], [
|
], [
|
||||||
], $result);
|
], $result);
|
||||||
|
|
||||||
$result = str_replace("{generation-time-taken}", microtime(true) - $start_time, $result);
|
$result = str_replace("{generation-time-taken}", round((microtime(true) - $start_time)*1000, 2), $result);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
public static function render_main($title, $content)
|
public static function render_main($title, $content)
|
||||||
|
@ -4258,7 +4258,7 @@ register_module([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= "\n\t\t<!-- Took " . (microtime(true) - $parsing_start) . " seconds to parse page source -->\n";
|
$content .= "\n\t\t<!-- Took " . round((microtime(true) - $parsing_start) * 1000, 2) . "ms to parse page source -->\n";
|
||||||
|
|
||||||
// Prevent indexing of this page if it's still within the noindex
|
// Prevent indexing of this page if it's still within the noindex
|
||||||
// time period
|
// time period
|
||||||
|
|
6
core.php
6
core.php
|
@ -509,7 +509,7 @@ else
|
||||||
{
|
{
|
||||||
$pageindex_read_start = microtime(true);
|
$pageindex_read_start = microtime(true);
|
||||||
$pageindex = json_decode(file_get_contents($paths->pageindex));
|
$pageindex = json_decode(file_get_contents($paths->pageindex));
|
||||||
header("x-pageindex-decode-time: " . round(microtime(true) - $pageindex_read_start, 6) . "ms");
|
header("x-pageindex-decode-time: " . round((microtime(true) - $pageindex_read_start)*1000, 3) . "ms");
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
@ -656,7 +656,7 @@ class page_renderer
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{body}
|
{body}
|
||||||
<!-- Took {generation-time-taken} seconds to generate -->
|
<!-- Took {generation-time-taken}ms to generate -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
";
|
";
|
||||||
|
@ -775,7 +775,7 @@ class page_renderer
|
||||||
], [
|
], [
|
||||||
], $result);
|
], $result);
|
||||||
|
|
||||||
$result = str_replace("{generation-time-taken}", microtime(true) - $start_time, $result);
|
$result = str_replace("{generation-time-taken}", round((microtime(true) - $start_time)*1000, 2), $result);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
public static function render_main($title, $content)
|
public static function render_main($title, $content)
|
||||||
|
|
|
@ -176,7 +176,7 @@
|
||||||
"author": "Starbeamrainbowlabs",
|
"author": "Starbeamrainbowlabs",
|
||||||
"description": "Allows you to view pages. You really should include this one.",
|
"description": "Allows you to view pages. You really should include this one.",
|
||||||
"id": "page-view",
|
"id": "page-view",
|
||||||
"lastupdate": 1462012572,
|
"lastupdate": 1462013968,
|
||||||
"optional": false
|
"optional": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -100,7 +100,7 @@ register_module([
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$content .= "\n\t\t<!-- Took " . (microtime(true) - $parsing_start) . " seconds to parse page source -->\n";
|
$content .= "\n\t\t<!-- Took " . round((microtime(true) - $parsing_start) * 1000, 2) . "ms to parse page source -->\n";
|
||||||
|
|
||||||
// Prevent indexing of this page if it's still within the noindex
|
// Prevent indexing of this page if it's still within the noindex
|
||||||
// time period
|
// time period
|
||||||
|
|
Loading…
Reference in a new issue