1.8.1 • Published 7 years ago

perfbench v1.8.1

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

 

Build Status

 

minimal setup

npm install perfbench --save

 

usage

Add to your package.json

"scripts": {
  "test": "perfbench http://localhost:3000"
}

use with CI

Add this line in your .travis.yml

scripts:
  - perfbench http://localhost:3000

 

metrics measured

  • First meaningful paint (1600 ms threshold)
  • Speed index metric (1250)
  • Time to interactive (2500 ms)
  • Total byte weight (1600 Kb)

 

test conditions

  • Network: Regular 3G (750 Kbps)
  • Device emulation: Nexus 5X
  • CPU: 5x slowdown

 

configuration

You can also drop a YAML file .perf.yml in the root of your repository for easier customisation.

All fields are optional.

runs: 2         # average of how many runs (optional, default: 3)
fail: false     # fail: true only throws a warning (optional, default: true)
thresholds:     # build will fail if these thresholds are not met (optional, defaults:)
  - first-meaningful-paint: 1600
  - speed-index-metric: 1250
  - time-to-interactive: 2500
  - total-byte-weight: 1600

 

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 in .perf.yml

event-type: pull_request

 

like it?

:star: this repo

 

todo

  • support multiple urls

 

license

MIT © siddharthkp

1.8.1

7 years ago

1.8.0

7 years ago

1.7.1

7 years ago

1.7.0

7 years ago

1.6.3

7 years ago

1.6.2

7 years ago

1.6.1

7 years ago

1.6.0

7 years ago

1.5.3

7 years ago

1.5.2

7 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.0

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago