Giter Site home page Giter Site logo

lalith88 / phantomas Goto Github PK

View Code? Open in Web Editor NEW

This project forked from macbre/phantomas

0.0 1.0 0.0 4.02 MB

PhantomJS-based web performance metrics collector and monitoring tool

Home Page: https://www.npmjs.com/package/phantomas

License: BSD 2-Clause "Simplified" License

JavaScript 92.86% Shell 0.04% HTML 7.08% CSS 0.02%

phantomas's Introduction

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 [email protected]: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:

phantomas's People

Contributors

macbre avatar gmetais avatar sjhcockrell avatar jgonera avatar william-p avatar cphoover avatar inem0o avatar eff avatar gomezd avatar stefanjudis avatar ingoclaro avatar vanng822 avatar rsnickell avatar sorensen avatar rupl avatar cvan avatar afeld avatar camjc avatar devside avatar dimichgh avatar imgbotapp avatar laurentgoderre avatar mrbig avatar nathanial avatar nickcurry avatar r-kovalenko avatar rosswilson avatar vinvol avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.