GithubHelp home page GithubHelp logo

alexxnica / perfbench Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siddharthkp/perfbench

0.0 1.0 0.0 413 KB

Continuous integration for performance monitoring

License: MIT License

JavaScript 79.40% CSS 6.49% HTML 14.11%

perfbench's Introduction



Continuous integration for performance monitoring

 

Build Status

 

install

npm install perfbench --save

 

usage

Build and run your application in your CI and then invoke perfbench

package.json:

"name": "my-awesome-app",
"scripts": {
  "pretest": "npm run build && pm2 start server.js",
  "test": "perfbench"
}

metrics measured

  • First meaningful paint
  • Speed index metric
  • Time to interactive
  • Total byte weight

 

test conditions

  • Network: Fast 3G (150ms RTT, 1.6Mbps down, 0.7Mbps up)
  • Device emulation: Nexus 5X
  • CPU: 5x slowdown

 

setup

  1. configuration

Drop a YAML file .perf.yml in the root of your repository.

url: http://localhost:3000            # the url you want to test
fail: false                           # optional, default: true. false will only show a warning
thresholds:                           # all rows are optional. add to customize the threshold
  - first-meaningful-paint: 1600      # optional, default: 1600, value in ms
  - speed-index-metric: 1250          # optional, default: 1250
  - time-to-interactive: 2500         # optional, default: 2500, value in ms
  - total-byte-weight: 1600           # optional, default: 1600, value in Kb

 

custom properties

You can also add custom properties.

Send a user timing performance event from your javascript.

performance.mark('Page ready')

And add the kebabcased key to .perf.yml

thresholds:
  - page-ready: 1500
event-type

For travis users, if you would like to run perfbench in pull_request instead of push, set event-type: pull_request

event-type: pull_request

 

  1. github token for status

build status

Currently works for Travis CI, CircleCI, Wercker, and Drone.

(Ask me for help if you're stuck)

like it?

⭐ this repo

 

todo

  • support multiple urls

 

license

MIT © siddharthkp

perfbench's People

Contributors

paulirish avatar renancouto avatar siddharthkp avatar

Watchers

 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.