mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-42447_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
9a36c7d95c
@ -752,7 +752,7 @@
|
||||
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
|
||||
<stringProp name="HTTPSampler.path">${sitepath}/mod/forum/post.php</stringProp>
|
||||
<stringProp name="HTTPSampler.method">POST</stringProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
|
||||
<boolProp name="HTTPSampler.follow_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.auto_redirects">false</boolProp>
|
||||
<boolProp name="HTTPSampler.use_keepalive">true</boolProp>
|
||||
<boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
|
||||
|
@ -893,6 +893,11 @@ class core_renderer extends renderer_base {
|
||||
$performanceinfo = $perf['html'];
|
||||
}
|
||||
}
|
||||
|
||||
// We always want performance data when running a performance test, even if the user is redirected to another page.
|
||||
if (MDL_PERF_TEST && strpos($footer, $this->unique_performance_info_token) === false) {
|
||||
$footer = $this->unique_performance_info_token . $footer;
|
||||
}
|
||||
$footer = str_replace($this->unique_performance_info_token, $performanceinfo, $footer);
|
||||
|
||||
$footer = str_replace($this->unique_end_html_token, $this->page->requires->get_end_code(), $footer);
|
||||
|
@ -217,6 +217,22 @@ if (!defined('PHPUNIT_TEST')) {
|
||||
define('PHPUNIT_TEST', false);
|
||||
}
|
||||
|
||||
// Performance tests needs to always display performance info, even in redirections.
|
||||
if (!defined('MDL_PERF_TEST')) {
|
||||
define('MDL_PERF_TEST', false);
|
||||
} else {
|
||||
// We force the ones we need.
|
||||
if (!defined('MDL_PERF')) {
|
||||
define('MDL_PERF', true);
|
||||
}
|
||||
if (!defined('MDL_PERFDB')) {
|
||||
define('MDL_PERFDB', true);
|
||||
}
|
||||
if (!defined('MDL_PERFTOFOOT')) {
|
||||
define('MDL_PERFTOFOOT', true);
|
||||
}
|
||||
}
|
||||
|
||||
// When set to true MUC (Moodle caching) will be disabled as much as possible.
|
||||
// A special cache factory will be used to handle this situation and will use special "disabled" equivalents objects.
|
||||
// This ensure we don't attempt to read or create the config file, don't use stores, don't provide persistence or
|
||||
|
@ -1709,12 +1709,18 @@ width: 80%; -moz-border-radius: 20px; padding: 15px">
|
||||
$htmllang = '';
|
||||
}
|
||||
|
||||
$footer = '';
|
||||
if (MDL_PERF_TEST) {
|
||||
$perfinfo = get_performance_info();
|
||||
$footer = '<footer>' . $perfinfo['html'] . '</footer>';
|
||||
}
|
||||
|
||||
return '<!DOCTYPE html>
|
||||
<html ' . $htmllang . '>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
'.$meta.'
|
||||
<title>' . $title . '</title>
|
||||
</head><body>' . $content . '</body></html>';
|
||||
</head><body>' . $content . $footer . '</body></html>';
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user