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

  1. #1
    Membre habitué
    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
    Points : 194
    Points
    194
    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 éminent sénior

    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
    Points : 10 726
    Points
    10 726
    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 habitué
    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
    Points : 194
    Points
    194
    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 éminent sénior

    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
    Points : 10 726
    Points
    10 726
    Par défaut
    je t'ai compilé la 0.10.2 essaye avec

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

  5. #5
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    Merci, mais avec cette version, j'ai une erreur (voir PJ)

    F.
    Images attachées Images attachées  

  6. #6
    Expert éminent sénior

    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
    Points : 10 726
    Points
    10 726
    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

  7. #7
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    Bon, je suis passé à PHP 3.0.10 au lieu de 3.0 et ta dll passe bien.

    Mais j'ai toujours cette erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    ( ! ) Warning: gzuncompress() [function.gzuncompress]: data error in D:\wamp\www\tests\xhprof\xhprof_lib\utils\xhprof_runs.php on line 278
    Call Stack
    #	Time	Memory	Function	Location
    1	0.0018	460536	{main}( )	..\index.php:0
    2	0.0115	1313440	displayXHProfReport( )	..\index.php:89
    3	0.0116	1313776	XHProfRuns_Default->get_run( )	..\xhprof.php:1377
    4	0.0118	1318496	gzuncompress ( )	..\xhprof_runs.php:278
    Given XHProf Run not found.
    Et le run_id est toujours à -1

  8. #8
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    Alors, on dirai que le CREATE de la table détails n'était pas bon. Il faut utiliser celui de l'interface : interface iXHProfRuns {} (xhprof_runs.php)

    La base est bien remplie, le UPDATE est correct.... mais... mais j'ai toujours cette satané erreur !!

  9. #9
    Expert éminent sénior

    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
    Points : 10 726
    Points
    10 726
    Par défaut
    Essaye de prendre la dernière version de la lib
    https://github.com/clickalicious/xhprof

    mais bon je te dis xhprof n'a pas de vrai support sous Windows, au delà de la compile qui passe et que l'extension soit chargé, rien de garanti le résultat

  10. #10
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    Mazeltov ... C'est bon . Il fallait faire un CREATE avec celui du fichier Pdo.php dans utils/db/

    J'ai pas vérifié tous les champs, çà là, çà marche !!

    Il ne me reste plus qu'a faire d'autres tests avec mon site fait en ZEND.

    Merci !!

    Fabrice

  11. #11
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    J'avais déjà pris la dernière version.

    Quel outils me conseilles-tu alors ?
    J'ai entendu de "bon echo" de xhprof sur le site de phptv (http://www.phptv.fr/interview-php-tour).

  12. #12
    Expert éminent sénior

    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
    Points : 10 726
    Points
    10 726
    Par défaut
    Si c'est juste pour le profiling tu peux juste utiliser xdebug

  13. #13
    Membre habitué
    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
    Points : 194
    Points
    194
    Par défaut
    Oui, je viens de voir çà avec WincacheGrind. çà à l'air pas mal, mais moins ergonomique dans la présentation que xhprof.

    En plus, avec un appli en Zend, on a trop de détails des classes Zend_ et difficilement nos propres controlleurs et modeles.

    F.

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