All Projects → macbre → Phantomas

macbre / Phantomas

Licence: bsd-2-clause
Headless Chromium-based web performance metrics collector and monitoring tool

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to Phantomas

Puphpeteer
A Puppeteer bridge for PHP, supporting the entire API.
Stars: ✭ 1,014 (-53.72%)
Mutual labels:  automation, developer-tools, puppeteer, headless-chrome
Ferrum
Headless Chrome Ruby API
Stars: ✭ 1,009 (-53.95%)
Mutual labels:  automation, developer-tools, chromium, headless-chrome
Headless Chrome Crawler
Distributed crawler powered by Headless Chrome
Stars: ✭ 5,129 (+134.09%)
Mutual labels:  puppeteer, chromium, headless-chrome, jquery
Nemetric
前端性能指标的监控,采集以及上报。用于测量第一个dom生成的时间(FP/FCP/LCP)、用户最早可操作时间(fid|tti)和组件的生命周期性能,,网络状况以及资源大小等等。向监控后台报告实际用户测量值。
Stars: ✭ 145 (-93.38%)
Mutual labels:  metrics, webperf, dom
Puppeteer Extra
💯 Teach puppeteer new tricks through plugins.
Stars: ✭ 3,397 (+55.04%)
Mutual labels:  automation, puppeteer, headless-chrome
Puppeteer
Headless Chrome Node.js API
Stars: ✭ 75,197 (+3332.09%)
Mutual labels:  automation, developer-tools, headless-chrome
Apify Js
Apify SDK — The scalable web scraping and crawling library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.
Stars: ✭ 3,154 (+43.95%)
Mutual labels:  automation, puppeteer, headless-chrome
Playwright Go
Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
Stars: ✭ 272 (-87.59%)
Mutual labels:  automation, chromium, headless-chrome
throughout
🎪 End-to-end testing made simple (using Jest and Puppeteer)
Stars: ✭ 16 (-99.27%)
Mutual labels:  chromium, headless-chrome, puppeteer
Webster
a reliable high-level web crawling & scraping framework for Node.js.
Stars: ✭ 364 (-83.39%)
Mutual labels:  puppeteer, chromium, headless-chrome
Puppeteer Api Zh cn
📖 Puppeteer中文文档(官方指定的中文文档)
Stars: ✭ 697 (-68.19%)
Mutual labels:  automation, developer-tools, puppeteer
Deno Puppeteer
A port of puppeteer running on Deno
Stars: ✭ 128 (-94.16%)
Mutual labels:  automation, puppeteer, headless-chrome
Puppeteer Examples
Puppeteer example scripts for running Headless Chrome from Node.
Stars: ✭ 2,781 (+26.93%)
Mutual labels:  developer-tools, puppeteer, headless-chrome
playwright-demos
playwright for scrapping and UI testing / automate testing workflows
Stars: ✭ 65 (-97.03%)
Mutual labels:  dom, chromium, puppeteer
Gotenberg
A Docker-powered stateless API for PDF files.
Stars: ✭ 3,272 (+49.34%)
Mutual labels:  puppeteer, chromium, http2
Awesome Puppeteer
A curated list of awesome puppeteer resources.
Stars: ✭ 1,728 (-21.13%)
Mutual labels:  automation, puppeteer, headless-chrome
Pyppeteer
Headless chrome/chromium automation library (unofficial port of puppeteer)
Stars: ✭ 1,286 (-41.31%)
Mutual labels:  automation, puppeteer, chromium
Reactopt
A CLI React performance optimization tool that identifies potential unnecessary re-rendering
Stars: ✭ 1,975 (-9.86%)
Mutual labels:  developer-tools, puppeteer, chromium
Phpchrometopdf
A slim PHP wrapper around google-chrome to convert url to pdf or to take screenshots , easy to use and clean OOP interface
Stars: ✭ 127 (-94.2%)
Mutual labels:  chromium, headless-chrome
Puppeteer Sharp
Headless Chrome .NET API
Stars: ✭ 2,122 (-3.15%)
Mutual labels:  puppeteer, chromium

phantomas npm Inline docs code style: prettier Coverage Status CodeFactor

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

Requirements

Installation

Via npm

latest

npm install phantomas

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

Via Docker

You can use phantomas Docker image:

docker pull macbre/phantomas:latest

Or you can fetch from GitHub's Containers registry

docker pull ghcr.io/macbre/phantomas:latest

Support

Foo

You can get support for phantomas via xs:code.

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);
});

// including the custom one emitted by phantomas modules
promise.on('domQuery', (type, query) => {
        console.log('DOM query by %s - "%s"', type, query);
});

Or run ./examples/index.js.

Development version

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

git clone [email protected]:macbre/phantomas.git
npm install

Running tests

First you need to start a local nginx container that will serve static assets used by integration tests suite. Then simply run npm t:

./test/server-start.sh
npm t

All pull requests that are filed for this repository will have tests run via GitHub Actions.

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 as an output format
  • 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.

You can also use it as a command line tool. Run phantomas -h for more details.

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:

Stargazers over time

Stargazers over time

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].