1.0.7 • Published 5 years ago

page-performance-monitor v1.0.7

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

Introduction

If you want to monitor your page's performance, eg. ttfb, the start of page request, the time of request. Performance API is a good choice for u.

npm.io

Usage

npm i page-performance-monitor

Examples

look at example/index.html or

<!DOCTYPE html>
<html lang="en">
<head>
    <script src="../dist/bundles.js"></script>
</head>
<body>
    <script>
        Perf.getPerformanceTiming();
    </script>
</body>
</html>

or

const Perf = require('page-performance-monitor');

// get performance data
Perf.getPerformanceTiming();

// send log
// logFunc: log function 
Perf.sendPerformanceLog({
    logId: 102304,
    ...
}, logFunc);

Stay In Touch

github

License

MIT

Keywords

page performance monitor

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago