npm.io
2.1.1 • Published 10 years ago

docpad-plugin-cpuprofiler

Licence
Version
2.1.1
Deps
1
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

CPU profiler Plugin for DocPad

NPM version Dependency Status Gittip donate button Analytics

Generates cpu snapshots using v8-profiler during specified docpad events that can be loaded in to the chrome profiler. Snapshot files are generated in the root of docpad under 'snapshots' folder by default

Config

plugins:
  cpuprofiler:
    # default output path relative to the docpad root path
    snapshotPath: "snapshots"

    # events that this plugin can start and stop recording from (change to suit your docpad instance)
    # default settings
    events: [
      {
        start: 'generateBefore',  # event to start recording
        stop:'generateAfter',     # event to stop recording
        recordSamples: false      # passes the record_samples (flame data) boolean flag to the profiler, default is false
      }
    ]

Capturing Multiple Events Example

plugins:
  cpuprofiler:
    # default output path relative to the docpad root path
    snapshotPath: "snapshots"

    events: [
      {start: 'generateBefore',               stop:'generateAfter'},
      {start: 'parseBefore',                  stop:'parseAfter'},
      {start: 'populateCollectionsBefore',    stop:'populateCollections'},
      {start: 'contextualizeBefore',          stop:'contextualizeAfter'},
      {start: 'renderBefore',                 stop:'renderAfter'},
      {start: 'renderCollectionBefore',       stop:'renderCollectionAfter'},
      {start: 'writeBefore',                  stop:'writeAfter'},
      {start: 'serverBefore',                 stop:'serverAfter'}
    ]

Capture across events

plugins:
  cpuprofiler:
    # default output path relative to the docpad root path
    snapshotPath: "snapshots"
    events: [
      {start: 'generateBefore',               stop:'writeAfter'}
    ]
Some of the events that can be specified
  'generateBefore'
  'generateAfter'
  'parseBefore'
  'parseAfter'
  'populateCollectionsBefore'
  'populateCollections'
  'contextualizeBefore'
  'contextualizeAfter'
  'renderBefore'
  'renderAfter'
  'renderCollectionBefore'
  'renderCollectionAfter'
  'writeBefore'
  'writeAfter' # (default)
  'serverBefore'
  'serverAfter'

Full event list is here

Tips

Good advice here:

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 2015+ Stringz Solutions Ltd
Copyright 2015+ Peter Flannery

Keywords