grunt-loadstats

WIP: Grunt task for measure web applications load and rendering performance through the PhantomJS headless browser.

Usage no npm install needed!

<script type="module">
  import gruntLoadstats from 'https://cdn.skypack.dev/grunt-loadstats';
</script>

README

grunt-loadstats (WIP) Build Status NPM version Dependencies

Grunt task for measuring web page rendering performance through the PhantomJS headless browser.

The task works in conjunction with external plugins in order to generate a HAR formatted JSON document and store or process it.

Plugins

  • Console Plugin (ConsolePlugin)
    • The only built-in plugin, mainly to illustrate the use. It outputs the HAR formatted documents, along with a bunch of debug information, directly into the console.
  • MongoDB Plugin (loadstats-mongodb-plugin)
    • This plugin allows you to take the HAR formatted document and store it directly into MongoDB.

Getting Started

npm install grunt-loadstats --save-dev

Instructions on adding MondoDB storage support

Options

options.urls

Arrays of urls to run performance checks on.

Sample url entry:

{
  "key": "UniqueKeyToIdentifyUrl",
  "url": "http://www.opentable.com/about"
}

options.plugins

Array of plugins to use. No default is used and will fail without it. Built-in option is "ConsolePlugin".

Sample Configuration

loadstats: {
    about_stats: {
        urls: [
            {
                key: "OpenTableAboutPage",
                url: "http://www.opentable.com/about"
            }
        ],
        plugins: ["ConsolePlugin"]
    }
}