npm.io
0.0.1 • Published 7 years ago

p-perf

Licence
ISC
Version
0.0.1
Deps
0
Size
3 kB
Vulns
0
Weekly
0

p-perf

Calculate page performance with window.performance.

计算网页页面的各种加载时间,用于性能监控和性能调优。

npm npm gzip

Install

npm i --save p-perf

Then import it.

import pagePerformance from 'p-perf';

or import it by script in HTML, then get pagePerformance on window.

<script src="https://unpkg.com/p-perf/index.js"></script>

API

There is only 3 API:

  • overview()

Get the overview performace time.

  • whiteScreen()

Get the whiteScreen time.

  • firstScreen()

Get the firstScreen time.

License

ISC@hustcc.

Keywords