Skip to content
PhantomJS-based web performance metrics collector and monitoring tool
JavaScript HTML
Branch: phantomas-v2
Clone or download

Latest commit

macbre Merge pull request #748 from macbre/dependabot/npm_and_yarn/lodash-4.…
…17.15

build(deps): bump lodash from 4.17.11 to 4.17.15
Latest commit e5daa9b Mar 6, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin bin/phantomas.js: use optimist-config-file from npm Feb 10, 2017
core eslint: remove "global" annotations Mar 5, 2019
docs performanceTiming:: update docs and metadata Feb 23, 2019
examples examples: add a short README Jan 8, 2019
extensions Metadata: add extensions Feb 3, 2019
lib test/integration-spec.yaml: comment out headersBiggerThanContent sect… Mar 5, 2019
modules eslint: remove "global" annotations Mar 5, 2019
reporters Code linting completed Jan 21, 2019
test puppeteer: use v1.15.0 (HeadlessChrome/75.0.3765.0) May 1, 2019
.eslintrc.yml Use eslint instead of jshint Jan 20, 2019
.gitignore Handle "scroll" option + test cases Jan 28, 2019
.jsbeautifyrc Introduce js-beautify Nov 19, 2014
.npmignore Do not publish examples/ to npm Feb 10, 2017
.travis.yml Travis | do not use system-wide Chrome binary May 1, 2019
AUTHORS Add AUTHORS file, thank you guys for your work! Apr 5, 2016
CONTRIBUTING.md CONTRIBUTING.md - adding a metric Jun 4, 2015
LICENSE Add BSD license file Nov 6, 2013
README.md README: add npm module usage example Feb 3, 2019
Troubleshooting.md Remove the webkit2 solution Mar 20, 2016
package-lock.json build(deps): bump lodash from 4.17.11 to 4.17.15 Nov 3, 2019
package.json Upgrade js-yaml to resolve security issues May 3, 2019

README.md

phantomas npm Build Status Known Vulnerabilities

Headless Chromium-based modular web performance metrics collector. And why phantomas? Well, because :)

Requirements

Installation

npm install phantomas

This will install a recent version of Chromium supported by puppeteer module.

Usage example

const phantomas = require('phantomas'),
    promise = phantomas('http://example.com/');

promise.
	then(results => {
		console.log('Metrics', results.getMetrics());
		console.log('Offenders', results.getAllOffenders());
    }).
    catch(res => {
		console.error(res);
    });

// events handling
promise.on('recv', response => {
	console.log('Response: %s %s [%s]', response.method, response.url, response.contentType);
});

Development version

To get the latest development version of phantomas (and install all required dependencies):

git clone git@github.com:macbre/phantomas.git
npm install

Having problems?

Please refer to /Troubleshooting.md

Features

  • modular approach - each metric is generated by a separate "module"
  • phantomas "core" acts as an events emitter that each module can hook into
  • in-depth metrics such as: number of events bound via jQuery, calls to window.writeor complex and duplicated CSS selectors (via analyze-css)
  • JSON and CSV as available output formats for easy integration with automated reporting / monitoring tools
  • easy integration with Continuous Integration tools via TAP format and assertions handling
  • metrics can be sent via StatsD or stored in elasticsearch
  • easy integration with other nodejs projects via CommonJS module (see API docs)
  • metrics can be emitted from JavaScript code of the page phantomas is run against (thanks to helper functions available in window.__phantomas)
  • device profiles allow phantomas to emulate mobile or tablet (by setting a proper user agent and viewport)

Contributors

All the contributors

Usage

phantomas comes as a CommonJS module (see API docs) that you can use in your nodejs projects.

Metrics

Please refer to /docs/metrics.md file for a full, up-to-date list of all available modules and metrics that phantomas emits.

For developers

Let's make Web a bit faster!

Slides

Blogosphere

Introductions to phantomas and use cases:

Videos

Utilities

Use grunt to automate daily dev tasks, including your's application web performance, via these great tools:

You can’t perform that action at this time.