This repository was archived by the owner on Feb 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
7.x 2.x helper profile
Andy Truong edited this page Dec 26, 2013
·
1 revision
$timer = at_container('helper.timer');
// Set the callback — code to be benchmarked
$timer->setCallback(function() { $modules = at_modules('at_base'); });
// Run it 10 times
$timer->setTimes(10);
// Profile the callback with xhprof
// If we defined $conf['at_xhprof_domain'] and $conf['at_xhprof_root'] in
// settings.php, then we just need callback setXProfConfig with empty array
// $timer->setXProfConfig()
$timer->setXProfConfig(array('domain' => 'http://xhprof.example.com/', 'root' => '/var/www/'));
// Now, start benchmarking
$data = $timer->run(); ___ ___________ _ _
/ _ \_ _| ___ \ | | | |
/ /_\ \| | | |_/ / __ _ ___ ___ _ __ ___ ___ __| |_ _| | ___
| _ || | | ___ \/ _` / __|/ _ \ | '_ ` _ \ / _ \ / _` | | | | |/ _ \
| | | || | | |_/ / (_| \__ \ __/_| | | | | | (_) | (_| | |_| | | __/
\_| |_/\_/ \____/ \__,_|___/\___(_)_| |_| |_|\___/ \__,_|\__,_|_|\___|
- Caching
- Twig template
- twig Service
- twig_string Service
- Recipes
- Extends
- Easy Block
- Easy Routing
- Easy Breadcrumb
- Entity Template
- Drush Commands:
- Functions:
- Misc
- Status
- Tools for Development enviroment
- /devel/php improved
- /at/sql
- /at/twig
- Kint integration