Skip to content

Instantly share code, notes, and snippets.

@tloudon
Created October 6, 2015 22:27
Show Gist options
  • Save tloudon/135818cacf19ddf32990 to your computer and use it in GitHub Desktop.
Save tloudon/135818cacf19ddf32990 to your computer and use it in GitHub Desktop.
bootstrap drupal, just to see how long it takes to load files, db, sessions, etc. no render
<?php
define('DRUPAL_ROOT', getcwd());
include_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@mikeytown2
Copy link

Add this the the end of the file

$runtime = round(microtime(TRUE) - $_SERVER['REQUEST_TIME_FLOAT'], 5);
echo "Drupal bootstrap took $runtime seconds\n<br>";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment