@perf-tools/performance
v1.1.1
Published
User Timing polyfill
Maintainers
Readme
@perf-tools/performance
User Timing polyfill
npm i --save @perf-tools/performanceUsage
// Polyfill
import from '@perf-tools/performance';
// As module
import { performance } from '@perf-tools/performance';Supported
- Browser, Worker and NodeJS
- API:
- now - Returns a
DOMHighResTimeStamprepresenting the number of milliseconds elapsed since a reference instant. - mark - Creates a
timestampin the browser's performance entry buffer with the given name. - measure - Creates a named
timestampin the browser's performance entry buffer between two specified marks (known as the start mark and end mark, respectively). - getEntries - Returns a list of
PerformanceEntryobjects based on the given filter. - getEntriesByType - Returns a list of
PerformanceEntryobjects of the given entry type. - getEntriesByName - Returns a list of
PerformanceEntryobjects based on the given name and entry type. - clearMarks - Removes the given
markfrom the browser's performance entry buffer. - clearMeasures - Removes the given
measurefrom the browser's performance entry buffer.
- now - Returns a
Not Supported
Development
npm inpm test, code coverage
