PerformanceMark() constructor creates a
timestamp with the given name.
performance.mark(), performance marks created by the constructor aren't added to the browser's performance timeline. This means that calls to the
getEntries*() methods (
getEntriesByType()) won't show entries for these marks.
new PerformanceMark(name) new PerformanceMark(name, markOptions)
A string representing the name of the mark.
An object for specifying a timestamp and additional metadata for the mark.
The following example shows how
PerformanceMark entries are constructed and then aren't part of the browser's performance timeline.
new PerformanceMark("squirrel"); new PerformanceMark("monkey"); new PerformanceMark("dog"); const allEntries = performance.getEntriesByType("mark"); console.log(allEntries.length); // 0
|User Timing |
BCD tables only load in the browser