Skip to content

Instantly share code, notes, and snippets.

@DicsyDel
Created January 12, 2018 20:16
Show Gist options
  • Save DicsyDel/f7dff8a7545cb52fe5cd635acfd749d9 to your computer and use it in GitHub Desktop.
Save DicsyDel/f7dff8a7545cb52fe5cd635acfd749d9 to your computer and use it in GitHub Desktop.
<?php
use Scalr\Modules\PlatformFactory;
use Scalr\Model\Entity;
include __DIR__ . '/../src/prepend.inc.php';
if (php_sapi_name() != 'cli') {
header("HTTP/1.0 404 Not Found");
exit();
}
$db = Scalr::getDb();
$env = Scalr_Environment::init()->loadById(4);
$cloudCredentials = $env->keychain(PlatformFactory::AZURE);
$time = microtime(true);
$platformModule = $env->getContainer()->platform->azure;
$res = $platformModule->GetServersList2($cloudCredentials, 'usa1042-vdc-eastus');
var_dump(microtime(true) - $time);
var_dump($res);
print "===========================\n";
$time = microtime(true);
$platformModule = $env->getContainer()->platform->azure;
$res = $platformModule->GetServersList($cloudCredentials, 'usa1042-vdc-eastus');
var_dump(microtime(true) - $time);
var_dump($res);
//Please clean up this file after you use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment