Socket
Socket
Sign inDemoInstall

easy-js-perf

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    easy-js-perf

A human readable wrapper of `window.performance` API


Version published
Weekly downloads
4
Maintainers
1
Install size
5.45 kB
Created
Weekly downloads
 

Readme

Source

easy-js-perf

A human readable wrapper of window.performance API

Usage

$ npm install easy-js-perf

It works on both browser and CommonJS environment, suppose you're using Webpack:

import Perf from 'easy-js-perf';
console.log(Perf());

And the output looks like:

{
  "domReady": 3271,
  "load": 4497,
  "domInteractive": 2420,
  "dns": 66,
  "ttfb": 578,
  "firstPaint": 3093,
  "requests": {
    "css": {
      "cnt": 2,
      "load": 3242.2650000000003
    },
    "link": {
      "cnt": 2,
      "load": 4264.080000000001
    },
    "img": {
      "cnt": 3,
      "load": 6516.655000000002
    },
    "script": {
      "cnt": 2,
      "load": 5080.160000000001
    },
    "xmlhttprequest": {
      "cnt": 1,
      "load": 334.03999999999996
    }
  }
}

Keywords

FAQs

Last updated on 26 Apr 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc