Removed modules/contrib/media module to allow update to the core media module
[yaffs-website] / vendor / cebe / markdown / tests / profile.php
1 <?php
2
3 require(__DIR__ . '/../Parser.php');
4 require(__DIR__ . '/../Markdown.php');
5
6
7 $markdown = '';
8 $markdown = file_get_contents(__DIR__ . '/markdown-data/specs.md');
9 //$markdown = file_get_contents(__DIR__ . '/github-data/github-sample.md');
10
11
12 //ini_set('xhprof.output_dir', __DIR__ . '/xhprof');
13
14 // http://de3.php.net/manual/en/xhprof.examples.php
15 xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
16
17 for ($n = 0; $n < 100; $n++) {
18         $pd = new \cebe\markdown\Markdown();
19         $pd->parse($markdown);
20 }
21
22 $xhprof_data = xhprof_disable();
23
24 $XHPROF_ROOT = __DIR__ . '/../vendor/facebook/xhprof/';
25 include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_lib.php';
26 include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_runs.php';
27
28 $xhprof_runs = new XHProfRuns_Default();
29 $run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_testing");
30
31 echo "http://localhost/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_testing\n";