JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14686
  • Score
    100M100P100Q141775F
  • License MIT

User Timing polyfill

Package Exports

  • @perf-tools/performance

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@perf-tools/performance) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@perf-tools/performance

User Timing polyfill

npm i --save @perf-tools/performance

Usage

// Polyfill
import from '@perf-tools/performance';

// As module
import { performance } from '@perf-tools/performance';

Supported

  • Browser, Worker and NodeJS
  • API:
    • now - Returns a DOMHighResTimeStamp representing the number of milliseconds elapsed since a reference instant.
    • mark - Creates a timestamp in the browser's performance entry buffer with the given name.
    • measure - Creates a named timestamp in the browser's performance entry buffer between two specified marks (known as the start mark and end mark, respectively).
    • getEntries - Returns a list of PerformanceEntry objects based on the given filter.
    • getEntriesByType - Returns a list of PerformanceEntry objects of the given entry type.
    • getEntriesByName - Returns a list of PerformanceEntry objects based on the given name and entry type.
    • clearMarks - Removes the given mark from the browser's performance entry buffer.
    • clearMeasures - Removes the given measure from the browser's performance entry buffer.

Not Supported


Development