IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

[XHPROF] save_run, le ID reste à -1


Sujet :

Langage PHP

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre éclairé
    Avatar de __fabrice
    Homme Profil pro
    Développeur Back-End
    Inscrit en
    Août 2004
    Messages
    404
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Back-End

    Informations forums :
    Inscription : Août 2004
    Messages : 404
    Par défaut [XHPROF] save_run, le ID reste à -1
    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 :
    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>";
    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
    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 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    Run Report
        Run #-1: Invalid Run Id = -1
    Une idée ?
    Merci
    Fabrice

  2. #2
    Expert confirmé

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Par défaut
    Le support de Xhprof sous Windows laisse à désirer, t'as quel version ? et ou a tu chopper le dll ? (et PHP 5.3 ou 5.4)

  3. #3
    Membre éclairé
    Avatar de __fabrice
    Homme Profil pro
    Développeur Back-End
    Inscrit en
    Août 2004
    Messages
    404
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Back-End

    Informations forums :
    Inscription : Août 2004
    Messages : 404
    Par défaut
    J'ai le fichier php_xhprof_0.10.0_PHP_5.3.3_VC6_x86_Thread_Safe.zip

    Je l'ai eu ici : http://www.phpfluesterer.de/projekte...tible-version/

    Et je suis sous :

    Version de Apache:2.2.11
    Version de PHP: 5.3.0

    Cela doit répondre à ta question.

    F.

  4. #4
    Expert confirmé

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Par défaut
    je t'ai compilé la 0.10.2 essaye avec

    https://github.com/stealth35/stealth....com/downloads

  5. #5
    Membre éclairé
    Avatar de __fabrice
    Homme Profil pro
    Développeur Back-End
    Inscrit en
    Août 2004
    Messages
    404
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Back-End

    Informations forums :
    Inscription : Août 2004
    Messages : 404
    Par défaut
    Merci, mais avec cette version, j'ai une erreur (voir PJ)

    F.
    Images attachées Images attachées  

  6. #6
    Expert confirmé

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Par défaut
    Ah oui tu dois être en VC6, je te conseil de prendre une version plus récente et en VC9, les VC6 ne sont plus supportés

Discussions similaires

  1. [j3d] HeavyComponent affiche au dessus du reste
    Par FarookFreeman dans le forum 3D
    Réponses: 3
    Dernier message: 10/07/2004, 22h44
  2. Réponses: 7
    Dernier message: 20/04/2004, 15h55
  3. automationn excel, Champ nombre reste en text ???
    Par mat_lefebvre dans le forum Access
    Réponses: 16
    Dernier message: 09/12/2003, 11h37
  4. Ecrire dans un fichier sans supprimer le reste
    Par koan_sabian dans le forum Linux
    Réponses: 4
    Dernier message: 20/02/2003, 15h44
  5. TBitBtn reste enfoncé
    Par TRINCAL Sylvain dans le forum C++Builder
    Réponses: 8
    Dernier message: 25/06/2002, 16h31

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo