docpad-plugin-chrometimeline

2.0.4 • Public • Published

Chrome Timeline Plugin for DocPad

Build Status NPM version Dependency Status Gittip donate button Bitdeli Badge

Generates a chrome timeline log for specified docpad events that can then be loaded in to the chrome dev timeline tool. Log files are generated in the root of docpad under /chrometimeline by default

Config

plugins:
    chrometimeline:
        # default output path relative to the docpad root path
        timelinePath: "chrometimeline"
        
        # default events that this plugin records 
        events: [
            {start: 'render',			marker: 'trigger'}
            {start: 'renderDocument', 	marker: 'trigger'}
            {start: 'generateBefore', 				end:'generateAfter', 		marker: 'trigger'}
            {start: 'parseBefore', 					end:'parseAfter'}
            {start: 'populateCollectionsBefore', 	end:'populateCollections'}
            {start: 'contextualizeBefore', 			end:'contextualizeAfter'}
            {start: 'renderBefore', 				end:'renderAfter'}
            {start: 'renderCollectionBefore', 		end:'renderCollectionAfter'}
            {start: 'writeBefore'					end:'writeAfter'}
            {start: 'serverBefore', 				end:'serverAfter'}
        ]

Duration and Trigger Markers

There are two type's of markers:

  1. A duration marker (default) that calculates the time between the start and end events. (omit the marker: property)
  2. A trigger marker that is fired once per event.
    To use, specify marker: "trigger" with the start: {{evenName}} property (see above config examples)
    Note: if an end event is also specified it to will be recorded as a trigger.

Duration events must specify both start and end properties. i.e. {start: 'renderBefore', end:'renderAfter'}

All end events are triggers, there is no way to change this at present.

Heap Capturing

All events capture the heap size at the time they are fired.

Example output

chrome-timeline

How the timeline vier works

https://developers.google.com/chrome-developer-tools/docs/timeline#timeline_panel_overview

You may experience the odd issue with the timeline as it can be a bit buggy (even when viewing chrome's recorded logs)

History

You can discover the history inside the History.md file

Contributing

You can discover the contributing instructions inside the Contributing.md file

License

Licensed under the incredibly permissive MIT License
Copyright © 2013+ Stringz Solutions Ltd
Copyright © 2013+ Peter Flannery

Readme

Keywords

none

Package Sidebar

Install

npm i docpad-plugin-chrometimeline

Weekly Downloads

3

Version

2.0.4

License

none

Last publish

Collaborators

  • pflannery