Skip to content

Sends profiling information as a Server Timing HTTP header to the browser

License

Notifications You must be signed in to change notification settings

mzeis/Mzeis_ServerTiming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 16, 2018
c392169 · Jan 16, 2018

History

11 Commits
Jan 8, 2018
Feb 16, 2017
Jan 16, 2018
Feb 15, 2017
Feb 16, 2017
Feb 15, 2017
Feb 15, 2017

Repository files navigation

Mzeis_ServerTiming

Server-Timing in action in Chrome

Small Magento 1 example extension that shows how Varien_Profiler information can be sent to the browser using the Server-Timing HTTP header so profiling info can be displayed e.g. by Google Chrome.

Note: this is only an example, so don't use it in production! As soon as Varien_Profiler::getTimers() returns values they will be sent in the browser, no checking of IPs or similar going on.

Thanks Christian Münch for the inspiration!

Installation

Install this extension using Composer and modman. In your composer.json, add an entry like this:

"require": {
    "mzeis/mzeis_server-timing": "v1.0.0"
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/mzeis/Mzeis_ServerTiming"
    }
]

Known issues

This won't work when Aoe_Profiler is enabled.

Also, at the time of writing Chrome like to truncate the string displayed in the Server Timing section.