$state = \Drupal::state(); xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY); for ($i = 0; $i < 10; $i++) { $state->getMultiple(array('install_task', 'install_time', 'menu.masks', 'system.private_key', 'system.theme.data')); } $xhprof_data = xhprof_disable(); $XHPROF_ROOT = "/usr/local/Cellar/xhprof/0.9.2"; include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php"; include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php"; $xhprof_runs = new \XHProfRuns_Default(); $run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_testing"); dpm("http://localhost/xhprof/index.php?run={$run_id}&source=xhprof_testing\n");