Bonjour à tous,
Je ne sais pas trop où poster ce message, je le met ici alors .
Je suis en train de tester XHPROF (wamp, windows xp), avec ce code :Jusque là, rien de compliqué, mais dans le xhprofGUI (avec le(s) lien(s) ci-dessus, j'ai cette erreur avec le id qui reste à "-1" :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 <?php xhprof_enable(XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY); function bar($x) { if ($x > 0) { bar($x - 1); } } function foo() { for ($idx = 0; $idx < 5; $idx++) { bar($idx); $x = strlen("abc"); } } // run program foo(); // stop profiler $xhprof_data = xhprof_disable(); // display raw xhprof data for the profiler run print_r($xhprof_data); //$XHPROF_ROOT = realpath(dirname(__FILE__) .'/..'); $XHPROF_ROOT= 'D:\wamp\offline-shared\includes\xhprof\git\xhprof'; //include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_lib.php"; //include_once $XHPROF_ROOT . "/xhprof_lib/utils/xhprof_runs.php"; $xhprof_root = 'D:/wamp/offline-shared/includes/xhprof/git/xhprof/'; include_once $xhprof_root . "xhprof_lib/config.php"; include_once $xhprof_root . "xhprof_lib/utils/xhprof_lib.php"; include_once $xhprof_root . "xhprof_lib/utils/xhprof_runs.php"; // save raw data for this profiler run using default // implementation of iXHProfRuns. $xhprof_runs = new XHProfRuns_Default(); // save the run under a namespace "xhprof_foo" $run_id = $xhprof_runs->save_run($xhprof_data, "xhprof_foo"); echo "<a href='http://localhost/tests/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_foo'> ici </a><br> "; echo "<a href='http://xhprof-local/index.php?run={$run_id}&source=xhprof_foo'> et/ou ici </a>";
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 Warning: gzuncompress() [function.gzuncompress]: data error in D:\wamp\offline-shared\includes\xhprof\git\xhprof\xhprof_lib\utils\xhprof_runs.php on line 278 Given XHProf Run not found.
et j'ai cette erreur si je ne passe pas par le virtualhost avec des warning :Une idée ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2Run Report Run #-1: Invalid Run Id = -1
Merci
Fabrice
Partager