GithubHelp home page GithubHelp logo

isabella232 / lab-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from automattic/lab-assistant

0.0 0.0 0.0 97 KB

A tool to measure performance deltas between two versions of a site

License: GNU General Public License v2.0

JavaScript 100.00%

lab-assistant's Introduction

lab-assistant

lab-assistant is a Puppeteer-based tool that does the grunt work of taking measurements and figuring out how much of a performance change there is between two different versions of your site.

This is a useful tool to run every time you're working on a loading performance improvement. It will help you gauge whether the improvement is real and not just placebo, and it'll give you a number to attach to your PR description, blog post, or annual employee self-assessment survey.

Impress your peers with actual numbers!

Usage

The easiest way to use lab-assistant is with a tool like npx:

npx lab-assistant http://v1.mysite.tld http://v2.mysite.tld

Here's the current full set of options (which you can get with --help):

lab-assistant.js <url> [url2]

Positionals:
  url   URL to fetch content from.
        If `url2` is not specified, this is used for both the new and old
        versions, with the application pausing in between to allow for the
        version swap.
  url2  Second URL to fetch content from.
        If specified, this refers to the new version, while `url` refers to
        the old version.

Options:
  --help              Show help                                        [boolean]
  --verbose, -v       Output more details.            [boolean] [default: false]
  --headless          Whether to use a headless browser.
                                                       [boolean] [default: true]
  --repeat, -r        The number of measurements to take for each version.
                                                          [number] [default: 10]
  --throwaway, -t     The number of throwaway visits to perform before any
                      actual measurements.
                      Keeping it at 1 or increasing the value can help with
                      stability.                           [number] [default: 1]
  --cpu_slowdown, -c  The CPU slowdown throttling to apply (may help achieve
                      more stable results in CPU-heavy pages).          [number]
  --metric, -m        The metric to consider.
                      Metrics:
                      - ttfb: Time to First Byte
                      - fp: First Paint
                      - fcp: First Contentful Paint
                      - dcl: Time to DOMContentLoad event end
                      - load: Time to Load event end
        [string] [choices: "ttfb", "fp", "fcp", "dcl", "load"] [default: "load"]

License

lab-assistant is licensed under GNU General Public License v2 (or later).

lab-assistant's People

Contributors

dependabot[bot] avatar sgomes 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.