Skip to content
No description, website, or topics provided.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
src
.bowerrc
.gitignore
README.md
bower.json
firebase.json
gulpfile.js
package.json
server.js

README.md

perf.js

Listen for Resource Timing API events.

Currently supports resources that are created on load and XHR requests.

Basic usage

var perf = window.Perf({
  performance: window.performance
  userAgent: window.navigator.userAgent,
  pageUrl: window.location.href
});

// raises an event for the individual resource as they happen
// currently works for initial resources on page load and XHR calls
perf.on('entry', function(resource) {
   console.log(resource);
});

Listen for XHR requests

perf.on('xmlhttprequest', function(resource) {
  // this will fire off for every XHR call (up to 150 entries in the Resource Timing API)
  console.log(resource); 
});
You can’t perform that action at this time.