Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Profiling TYPO3 Flow Applications

Profiling TYPO3 Flow Applications

Presentation given at T3CON NA in San Francisco. The slides also match the presentation giving during Inspiring Flow 2013 in Kolbermoor on 2013/04/20.

Karsten Dambekalns

May 30, 2013
Tweet

More Decks by Karsten Dambekalns

Other Decks in Programming

Transcript

  1. Inspiring people to
    share
    Inspiring people to
    share
    Profiling
    TYPO3 Flow
    Applications

    View full-size slide

  2. Karsten Dambekalns
    TYPO3 Neos and Flow developer
    35 years old
    lives in Lübeck, Germany
    1 wife, 3 sons
    1 espresso machine
    likes canoeing & climbing

    View full-size slide

  3. Plumber &
    PhpProfiler

    View full-size slide

  4. Metrics at a glance

    View full-size slide

  5. Listing Profiling Runs

    View full-size slide

  6. Listing Profiling Runs

    View full-size slide

  7. XHProf Profiling Data

    View full-size slide

  8. Request Timeline

    View full-size slide

  9. Comparing Runs

    View full-size slide

  10. Installation &
    Configuration

    View full-size slide

  11. Installing XHProf
    On Windows:
    •If you need a working DLL for XHProf on Windows (PHP 5.4) check
    http://dev.freshsite.pl/php-extensions/xhprof.html
    •This one tracks time, while other builds found on the internet did
    not
    MacPorts:
    •sudo port install php54-xhprof
    Linux:
    •Search for a package in your distribution of choice

    View full-size slide

  12. "repositories": [
    {
    "type": "git",
    "url": "https://github.com/kdambekalns/Plumber.git"
    },
    {
    "type": "git",
    "url": "https://github.com/kdambekalns/PhpProfiler.git"
    }
    ]
    "require": {
    "sandstorm/plumber": "standalone",
    "sandstorm/phpprofiler": "standalone-addedbackends as 1.0.3-dev"
    }
    Installing Plumber
    composer.json

    View full-size slide

  13. -
    name: 'Plumber'
    uriPattern: 'profiler/'
    defaults:
    '@format': 'html'
    subRoutes:
    PlumberSubroutes:
    package: Sandstorm.Plumber
    Installing Plumber
    Routes.yaml

    View full-size slide

  14. Sandstorm:
    Plumber:
    calculations:
    fileSystemCalls:
    label: 'No. of FS calls'
    type: regexSum
    regex: '#==>(file_get_contents|file_exists|
    filesize|is_dir|is_file|is_link|realpath|symlink|
    file_put_contents)#'
    Configuration
    Settings.yaml

    View full-size slide

  15. What is new?
    (in my version)

    View full-size slide

  16. More XHProf Beauty
    PhpProfiler can store data for
    •xhprof.io settings (http://xhprof.io/)
    •preinheimer-xhgui (https://github.com/preinheimer/xhgui)
    Install from their websites and set up as documented there :)
    Configure the backend(s) to use

    View full-size slide

  17. XHGui, Paul Reinheimer style

    View full-size slide

  18. XHGui Custom Views

    View full-size slide

  19. Sandstorm:
    PhpProfiler:
    'xhprof.io':
    enable: true
    username: 'myuser'
    password: 'mypassword'
    'xhgui':
    enable: true
    Configuration
    Settings.yaml

    View full-size slide

  20. Running the UIs
    preinheimer-xhgui
    cd /path/to/xhgui/web/webroot
    php -S localhost:8080
    xhprof.io
    cd /path/to/xhprof.io
    php -S localhost:8080
    •unfortunately that needs a proper virtual host

    View full-size slide

  21. Up and Coming

    View full-size slide

  22. Plans for the near Future
    Make use of backends configurable
    •there are some more helpful configuration settings
    Import existing profiles into new analysis tools
    •if a better UI comes up, using old data would be nice
    Provide "production mode" that can be left running on live servers
    •do not profile every request, but only every 2nd, 10th, 100th, …
    Merge branches back into master, polish, promote

    View full-size slide

  23. Help to make this reality!
    Fund my project proposal
    Any amount helps
    Have a better Plumber
    Pledge

    View full-size slide

  24. Thank You!
    slides:
    http://speakerdeck.com/kdambekalns
    http://slideshare.net/kfish
    email: [email protected] | [email protected]
    web: http://karsten.dambekalns.de
    twitter & app.net: @kdambekalns

    View full-size slide