Coder Social home page Coder Social logo

xhprofbundle's People

Contributors

adrienbrault avatar aheinz-sg avatar amoqu avatar baldurrensch avatar craigmarvelley avatar dbu avatar dcsg avatar demontpx avatar ewgra avatar fruit avatar hex337 avatar jeremyfreeagent avatar jeremymarc avatar jonaswouters avatar jordymoos avatar lyrixx avatar mathielen avatar maxromanovsky avatar metabor avatar mhor avatar paulandrieux avatar robertdolca avatar salemgolemugoo avatar scrutinizer-auto-fixer avatar seldaek avatar sgrodzicki avatar shouze avatar sliver avatar stephpy avatar tobion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xhprofbundle's Issues

Implement ConfigurationInterface to dump config

$ app/console config:debug jns_xhprof

  [LogicException]                                                                                                                                 
  Configuration class "Jns\Bundle\XhprofBundle\DependencyInjection\Configuration" should
  implement ConfigurationInterface in order to be dumpable

Xhprof detail table and mysql >=5.6

Hi, since this bundle use an Entity definition and not MappedSuperclass, launching schema-update command will insert the details table in mysql.

But there is a big mistake on this table, xhprof called a column get which is a reserved words on mysql 5.6.

I'm not sure if there is solution planified at this moment from xhprof team but we could transform the entity as mapped superclass to avoid automatic creation of this one even if we don't care about.

User'll have to create an Entity which extends the superclass to benefits of details table (if he's on mysql < 5.6).

I can make a PR if you're ok.
@Gissues:{"order":50,"status":"notstarted"}

Requirements could not be resolved

Hi,

I'm using symfony-standard v2.1.11, and it requires doctrine/doctrine-bundle v1.1.0.
But XhprofBundle requires doctrine/doctrine-bundle v1.2.0.

Now, when executing composer update, there will be an error with message Your requirements could not be resolved to an installable set of packages.

problem with bundle and XHGUI

HI all I have a problem in setting up the bundle with XHGUI.
this is the DEV environment

  • MAC osx 10.8.5
  • apache 2.2 and php 5.3.28
  • mysql 5.5.24
  • symfonty 2.3.9

the bundles save the profiled data correctly to MYSQL but when I try to access XHGUI from the profile console I get an error from the http://xhprof:81/xhprof_html/.
The server created for xhpro.

The error is 500 internal server error.

This is the error in apache LOG :

[Mon Mar 03 18:16:38 2014] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Mon Mar 03 18:16:38 2014] [debug] core.c(3112): [client 127.0.0.1] r->uri = /Users/me/webtool/dev.php

It looks like the problem is in .htaccess config of the symfony2 public directory, or in the apache virtualhost for xhprof. Any one has an idea ? Have you ever had such a problem with symfony2 and this bundle ?

thanks a lot!

license

hi. can you add license pls? (it's not on packagist too...)

The "--xhprof" option does not exist

Hello,

I did not notice when, but such bug appeared.

Our configuration:

jns_xhprof:
    enabled: true
    command: option
    command_option_name: xhprof

Upon clearing caches this always happens no matter if we set the option or don't:

  The "--xhprof" option does not exist.

...
 Jns\Bundle\XhprofBundle\EventListener\CommandListener->isProfileOption() at /var/www_match/vendor/jns/xhprof-bundle/EventListener/CommandListener.php:125
...

Maybe it was impacted by Symfony 2.8 upgrade?

I managed to workaround this by using new Symfony 2.8 functionality and simplifying isProfileOption method:

private function isProfileOption(ConsoleCommandEvent $event)
    {
        $definition = $event->getCommand()->getDefinition();
        $input = $event->getInput();

        $definition->addOption(new InputOption($this->optionName, null, InputOption::VALUE_NONE, '<info>JnsXhprofBundle</info>: Whether to profile this command with xhprof', null));
        $input->bind($definition);
    }

Inheritance Mapping in other database doesn't works

Hi,

I try to use you bundle, however I 've a problem when I implement a the bundle with a new database. My configuration looks like this

-- my jns_xhprof.yml

jns_xhprof:
    location_web:    http://profiler.api.me.lan/
    entity_manager:  profiler
    enabled:         true
    entity_class:    Acme\ProfilerBundle\Entity\XhprofDetail
    enable_xhgui:    true
    command: option
    command_option_name: xhprof

In my config.yml,

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                driver:   "pdo_pgsql"
                host:     "localhost"
                port:     "5432"
                dbname:   "app"
                user:     "user"
                password: "user"
                charset:  UTF8
            profiler:
                driver:   "pdo_pgsql"
                host:     "localhost"
                port:     "5432"
                dbname:   "profiler"
                user:     "profiler"
                password: "profiler"
                charset:  UTF8

    orm:
        default_entity_manager: default
        auto_generate_proxy_classes: "%kernel.debug%"
        entity_managers:
            default:
                connection: default
                mappings:
                    AcmeAppBundle:  ~
            profiler:
                connection: profiler
                mappings:
                    AcmeProfilerBundle:  ~

then I create my entity class like said in readMe

use Jns\Bundle\XhprofBundle\Entity\XhprofDetail as Base;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="details")
 */
class XhprofDetail extends Base
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="string", unique=true, length=17, nullable=false)
     * @ORM\Id
     */
    protected $id;
}

And when I deploy with the symfony command, my 'details' table contains only Id.

php app/console doctrine:schema:update --em=profiler

-- results

           Table "public.details"

 Column |         Type          | Modifiers 
--------+-----------------------+-----------
 id     | character varying(17) | not null

Why My entity doesn't inherit of the MasterMappedClass ? That very strange because when I unset the em=provider in my command, the table was generated correctly. Do I do a bad something ?

Cheers

--xhprof command option not always trigger

I need to run a command few times before XHProf start run text shows up, otherwise xhprof won't debug my code... It's annoying because it's so random this triggers or not...

Unable to update via composer

Trying to run a "composer update"; I get the following error:
Problem 1
- jns/xhprof-bundle dev-master requires facebook/xhprof * -> no matching package found.
- jns/xhprof-bundle dev-master requires facebook/xhprof * -> no matching package found.
- Installation request for jns/xhprof-bundle dev-master -> satisfiable by jns/xhprof-bundle[dev-master].

Error on production server with xhprof disabled

This is kinda strange. It was working fine, but today after I run composer self-update and then composer install I've got this issue:

*@cat:~/projects/*/www$ ./composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing facebook/xhprof (dev-master 6bf0072)
    Cloning 6bf00728827fc1e2a639dff6f94f1618396bffc5

  - Installing jns/xhprof-bundle (dev-master 2630d49)
    Cloning 2630d49bab9b0722c8e184e2e8153edbdbe74d5f

  - Installing sensio/generator-bundle (dev-master e50108c)
    Cloning e50108c2133ee5c9c484555faed50c17a61221d3

jns/xhprof-bundle suggests installing ext-xhprof (Hierarchical Profiler for PHP)
Generating autoload files
Updating the "app/config/parameters.yml" file



  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
  Xhprof Bundle is enabled but the xhprof extension is not enabled.



Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-install-cmd event terminated with an exception



  [RuntimeException]
  An error occurred when executing the "'cache:clear --no-warmup'" command.



install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

Invalid run id from command line

Hello,

First of all, thank you very much for that great bundle! :)

It works perfectly in dev mode from the debugging bar, and I also got the URL in headers when in prod mode.

When I run it in console, with the "option" or the "on" config values, I get a link, but always with a wrong id :(

In my app/config.yml file:

jns_xhprof:
    location_web:    http://localhost/xhprof
    enabled:         true
    command: "option"
    command_option_name: "profile"

An example command and result:

php app/console doctrine:schema:validate --env=dev --profile 
XHProf starting run

---
[Mapping]  OK - The mapping files are correct.
[Database] OK - The database schema is in sync with the mapping files.

---
XHProf run link http://localhost/xhprof?run=5322d47c49104&source=Symfony

And when I follow the link:

Run Report
    Run #5322d47c49104: Invalid Run Id = 5322d47c49104

Did I miss something?

support console command profiling

hi,
i needed console profiling. for now, i just slapped together a console event listener (symfony 2.3+) but if you are interested, i can do a pull request.

the code at https://github.com/dbu/XhprofBundle/blob/master/DataCollector/XhprofCollector.php#L52 is checking something about cli - is that working already?

if you want, we need to agree how to refactor the code as on console there is no request. XhprofCollector could provide entry points for the console. we could have separate configuration for the console too, or use the same (for the exclude patterns at least, a separate config makes more sense)

Support for session profiling

Hi Jonas!

Is there any support for session-wide logging through a request parameter? It would be particularly interesting to enable logging for Ajax and Post requests.
If the bundle doesn't support it already, is that something you'd accept as a pull request?

Thanks for the bundle, it's awesome, in any case ;)

How to use this bundle

Hi,

Is there any documentation about how to actually use this bundle - I can see how to install and configure it. But how to inject the service(s), how to start the profiling, and how to collect the results for the web page. Does this bundle set up a route for the web page from web_location, or do you have to do that yourself. I'm also using it with XHGui, as that seems to be allowed.

many thanks

No data is saved

I have set this bundle up with a separate entity manager and everything seems to be working. When loading a page I can see in the MySQL log that a transaction is started, an insert query is issued and the transaction is committed. But nothing is being saved.

There's a lot of binary data being inserted, which makes it really hard to copy and retry the query in order to see its potential error message. I am at loss at how to debug this. Any ideas please?

XHGui

Hi!

How do I use XHGui with XhprofBundle?
I mean, do I have to set XHGui up as standalone thing and just add its hostname to app/config/config.yml to 'location_web'?

New parameter location_config

Hi,

I got an error:

Fatal error: Jns\Bundle\XhprofBundle\DataCollector\XhprofCollector::stopProfiling(): Failed opening required

There is a new parameter named location_config need to be set.
I have no idea how to add the parameter.

Could someone figure this out?

config.php purpose?

Hi

I have been trying to make this bundle to work, everything works fine but it is forcing me to create a config.php (which is actually empty)

What contents should be there? And more than this... could config.php location be optional instead of mandatory?

Anyway, great work on integrating xhprof in symfony2 profiler!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.