Skip to content

Instantly share code, notes, and snippets.

@dawehner
Forked from damiankloip/gist:5343836
Last active December 15, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dawehner/5343845 to your computer and use it in GitHub Desktop.
Save dawehner/5343845 to your computer and use it in GitHub Desktop.
$times = array();
for ($i = 0; $i <= 10; $i++) {
$view = views_get_view('frontpage');
for ($j = 0; $j <= 100; $j++) {
$view->setDisplay('page_1');
$view->execute();
$start = microtime();
$view->destroy();
$end = microtime();
$time = ($end - $start);
$times[] = $time;
}
}
print implode(', ', $times);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment