Task #3583 ยป index.php

index.php with profiling code included - Karsten Dambekalns, 2009-06-24 10:51

 
1
<?php
2
declare(ENCODING = 'utf-8');
3

    
4
/*                                                                        *
5
 * This script belongs to the FLOW3 framework.                            *
6
 *                                                                        *
7
 * It is free software; you can redistribute it and/or modify it under    *
8
 * the terms of the GNU Lesser General Public License as published by the *
9
 * Free Software Foundation, either version 3 of the License, or (at your *
10
 * option) any later version.                                             *
11
 *                                                                        *
12
 * This script is distributed in the hope that it will be useful, but     *
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *
14
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser       *
15
 * General Public License for more details.                               *
16
 *                                                                        *
17
 * You should have received a copy of the GNU Lesser General Public       *
18
 * License along with the script.                                         *
19
 * If not, see http://www.gnu.org/licenses/lgpl.html                      *
20
 *                                                                        *
21
 * The TYPO3 project - inspiring people to share!                         *
22
 *                                                                        */
23

    
24
/**
25
 * Bootstrap for the FLOW3 Framework
26
 *
27
 * @package FLOW3
28
 * @version $Id: index.php 1942 2009-02-25 16:11:16Z k-fish $
29
 * @author Robert Lemke <robert@typo3.org>
30
 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser Public License, version 3 or later
31
 */
32

    
33
xhprof_enable(XHPROF_FLAGS_CPU);
34

    
35
define('FLOW3_PATH_PUBLIC', str_replace('\\', '/', __DIR__) . '/');
36
require(FLOW3_PATH_PUBLIC . '../Packages/Global/FLOW3/Classes/Core/Bootstrap.php');
37

    
38
$framework = new \F3\FLOW3\Core\Bootstrap(getenv('FLOW3_CONTEXT'));
39
$framework->initialize();
40
$framework->run();
41

    
42
$xhprof_data = xhprof_disable();
43
$XHPROF_ROOT = '/Users/karsten/Sites/tools_test';
44
include_once($XHPROF_ROOT . '/xhprof_lib/utils/xhprof_lib.php');
45
include_once($XHPROF_ROOT . '/xhprof_lib/utils/xhprof_runs.php');
46

    
47
$xhprof_runs = new \XHProfRuns_Default();
48
$runId = $xhprof_runs->save_run($xhprof_data, 'FLOW3');
49
echo '<a target="_blank" href="http://localhost/tools_test/xhprof_html/index.php?source=FLOW3&run=' . $runId . '">profiling</a>';
50

    
51
?>
    (1-1/1)