GithubHelp home page GithubHelp logo

aragon999 / froshprofiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from friendsofshopware/froshprofiler

0.0 2.0 0.0 1.54 MB

Profiling for Shopware

License: MIT License

PHP 85.16% CSS 2.83% Smarty 8.91% JavaScript 3.04% Shell 0.06%

froshprofiler's Introduction

Profiling

Travis CI

Profiling for Shopware

Version Requirements Availability
1.3 Min. Shopware 5.2, PHP 5.6 Github & Community Store
1.4 Min. Shopware 5.5, PHP 7.1 Github (with 5.6 Release also in Store)

Please create Pull Requests to the lowest version

Installation

Zip Installation package for the Shopware Plugin Manager

  • Download the latest plugin version (e.g. FroshProfiler-1.3.6.zip)
  • Upload and install plugin using Plugin Manager

Git Version

  • Checkout Plugin in /custom/plugins/FroshProfiler
  • Change to Directory and run composer install to install the dependencies
  • Install the Plugin with the Plugin Manager

Install with composer

  • Change to your root Installation of shopware
  • Run command composer require frosh/shopware-profiler and install and active plugin with Plugin Manager

Features

Var Dump Server

Starting with 1.3.0 profiler does also support var dump server from Symfony 4.1.

How to use it?

  • Enable var dump server in plugin config
  • Open a terminal and run ./bin/console server:dump --format=html > dump.html
  • Use method dump() in your code and open dump.html in your Browser.

VarDumpServerHtml

Adding additional stop watch events

$this->get('frosh_profiler.stop_watch')->start('Watch Name');

// Your code

$this->get('frosh_profiler.stop_watch')->stop('Watch Name');

Go to Performance tab, and your custom events are shown there

JavaScript: StateManager and Event Logging

Will log ...

... PubSub events:

  • subscribe (event name)
  • unsubscribe (event name)
  • publish (event name, arguments)

... Plugin registration:

  • addPlugin (plugin name, element, viewports)
  • removePlugin (plugin name, element)
  • updatePlugin (plugin name, element)
  • destroyPlugin (plugin name, element)

... Breakpoint change:

  • switchPlugins (previous/current state)

... Plugin initialization:

  • initPlugin (plugin name, selector, event handlers)

Filter

You can filter output by ...

  • type (available: subscribe, unsubscribe, publish, addPlugin, removePlugin, updatePlugin, destroyPlugin, switchPlugins, initPlugin)
  • event name
  • plugin name

To set filter use the javascript console and the following functions, corresponding to each filter:

StateDebug.setFilterType('publish');
StateDebug.setFilterEvent(['onTrackItems', 'onSetSizes']);
StateDebug.setFilterPlugin('swAjaxVariant');

You can pass a single filter criteria as string or an array of multiple filter criterias.

Type criterias need to be exact and valid (see above). Event and plugin name criterias can include part of the name.

To reset filter criterias call the functions without any arguments.

Backend Profiling

Backend Profiling can be enabled in plugin configuration. The Profile link can be retrieved from the Request Response Header "X-Profiler-URL"

Images

Browser Toolbar

Performance Profiling

froshprofiler's People

Contributors

shyim avatar bcremer avatar fionera avatar joshuabehrens avatar afoeder avatar mablae avatar xf- avatar jhofm avatar imgbot[bot] avatar dependabot-support avatar teiling88 avatar larsbo avatar jenskueper avatar janbuecker avatar hgiesenow avatar dneustadt avatar xndrdev avatar

Watchers

James Cloos avatar Max avatar

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.