コード例 #1
0
function scoped_test()
{
    $transaction = hhvm_newrelic_get_scoped_transaction();
    hhvm_newrelic_transaction_set_name("scoped_transaction");
    hhvm_newrelic_transaction_set_request_url("/my/scoped/transaction");
    $generic_segment = hhvm_newrelic_get_scoped_generic_segment("generic_segment_name");
    sleep(2);
    $database_segment = hhvm_newrelic_get_scoped_database_segment("table", "select");
    sleep(3);
}
コード例 #2
0
ファイル: index.php プロジェクト: Covert-Inferno/zKillboard
    User::autoLogin();
}
// Theme
$viewtheme = null;
if (User::isLoggedIn()) {
    $viewtheme = UserConfig::get("viewtheme");
}
$app->config(array("templates.path" => $baseDir . "templates/" . ($viewtheme ? $viewtheme : "bootstrap")));
// Error handling
$app->error(function (\Exception $e) use($app) {
    include "view/error.php";
});
// Load the routes - always keep at the bottom of the require list ;)
include "routes.php";
// Load twig stuff
include "twig.php";
// Send debug info to chrome logger
if ($debug) {
    ChromePhp::log($_SERVER);
    ChromePhp::log("Cache Used: " . Cache::getClass());
    ChromePhp::log("Queries: " . Db::getQueryCount());
    ChromePhp::log("IP Server sees: " . IP::get());
    ChromePhp::log("Page generation time (Minus queries): " . Util::pageTimer());
}
// Run the thing!
$app->run();
if ($newRelic) {
    // New Relic
    hhvm_newrelic_transaction_set_name($uri);
    hhvm_newrelic_transaction_end();
}