Git Product home page Git Product logo

profilerlivebundle's Introduction

ProfilerLiveBundle

Overview

Provides a realtime interface for the Symfony2 WebProfilerBundle. Requests and responses can be viewed in realtime while navigating through a Symfony2 application. Important information is displayed with each profile including request URL, response status code, any exception details, doctrine information, memory usage and more.

profiler_live_bundle

Features

  • See realtime requests/responses from your Symfony2 application including:
    • Memory usage
    • Response Time
    • Response Status Code
    • Controller and Route
    • Any Exceptions
    • Resonse Content Type
  • See Sub Requests
  • Filter by:
    • Request URL
    • Request Method
    • Response Status Code
    • Response Content Type
  • Color coded response types to easily spot errors, 404's and redirects
  • Easily links to WebProfilerBundle for full details of profile

Dependancies

  • WebProfilerBundle

If you are using the Symfony2 Standard Distribution the WebProfilerBundle is already installed and configured.

Installation

  1. Add ProfilerLiveBundle to vendor dir:

    • Using vendors script

      Add the following to the deps file:

        [ProfilerLiveBundle]
            git=git://github.com/dsyph3r/ProfilerLiveBundle.git
            target=/bundles/Profiler/LiveBundle
      

      Run the vendors script:

        $ php bin/vendors install
      
    • Using git submodules:

        $ git submodule add git://github.com/dsyph3r/ProfilerLiveBundle.git vendor/bundles/Profiler/LiveBundle
      
  2. Add the Profiler namespace to your autoloader:

     // app/autoload.php
     $loader->registerNamespaces(array(
         // ..
         'Profiler'    => __DIR__.'/../vendor/bundles',
     ));
    
  3. Add bundle to application kernel:

     // app/ApplicationKernel.php
     public function registerBundles()
     {
         return array(
             // ...
             new Profiler\LiveBundle\ProfilerLiveBundle(),
         );
     }
    
  4. Add routing for ProfilerLiveBundle:

     # app/config/routing_dev.yml
     ProfilerLiveBundle:
         resource: "@ProfilerLiveBundle/Resources/config/routing.yml"
         prefix:   /
    
  5. Clear Cache

     $ php app/console cache:clear
    
  6. Install assets:

     $ php app/console assets:install --symlink web
    

Point your browser to http://yourdomain.com/app_dev.php/_live_profiler to run the live profiler. Browse your application as normal in another tab/window.

Usage

The ProfilerLiveBundle is configured to use the existing Storage engine, by default in the Symfony2 Standard Distribution this uses Sqlite. If you would like to use MySql instead simply add the following paramaters to the file at app/config/parameters.ini.

[parameters]
    profiler.storage.dsn = "mysql:host=localhost;dbname=profiler;"
    profiler.storage.username = %database_user%
    profiler.storage.password = %database_password%
    profiler.storage.class = Profiler\LiveBundle\Profiler\Storage\MysqlProfilerStorage

Contributing

The WebProfilerBundle uses a number of external libries including jQuery, jQuery UI and underscore. CoffeeScript is also used so you must not edit the JavaScript files in the folder Resources/public/js. Instead edit the CoffeeScript files and compile this to JavaScript using something like the following:

$ coffee --watch -o Resources/public/js -c Resources/data/coffee

Future features

There are a number of features I'd like to implement including:

  • Add support for additional DataCollectors in the WebProfilerExtraBundle so output for Assetics, Twig, Routing and the Container can be captured.
  • Add ability to Pause, Play and Step through the requests.
  • Memory management - At present there is no management of profiles, this will cause problems when a lot of requests have been sent over.
  • Add ability to load historic profiles - between date/time ranges.
  • Add more information into the Live Profile view. Information such as POST parameters should be available without having to click through to the WebProfilerBundle.
  • Possibly port over to Backbone.js. There wouldn't be more work in this as it is already using underscore.js and there are Model classes already defined.
  • Use Assetic to complie and output the CoffeeScript files into JavaScript.
  • Add support for graphing of profiled information such as number of database requests

Changelog

  • v0.1 (2011-10-20) - Initial release

profilerlivebundle's People

Contributors

dsyph3r avatar extreme avatar hanken avatar lsmith77 avatar youbs 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

Watchers

 avatar  avatar  avatar  avatar  avatar

profilerlivebundle's Issues

Symfony CS compliance?

just wondering if you intentionally are not following the Symfony coding style in regards to if, foreach and other similar code constructs?

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.