@perf-tools/performance
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@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

Package Sidebar

Install

npm i @perf-tools/performance

Weekly Downloads

488

Version

1.1.1

License

MIT

Unpacked Size

18.2 kB

Total Files

8

Last publish

Collaborators

  • rubaxa