Web APIs

performance.mark()

Try the free JavaScript compiler

Creates a PerformanceMark entry. Optional startTime sets an explicit nonnegative timestamp; optional detail supplies associated data.

Formal Syntax & Structure

javascript syntaxjavascript
performance.mark(name, [options])

Parameters & Attributes

NameTypeDescription
namestringMark name.
optionsPerformanceMarkOptionsOptional timestamp and detail.

Return Value

PerformanceMark

New mark entry.

Working Example

Example Snippetjavascript
(async () => {const m=performance.mark("v16-start",{startTime:10}); console.log(m.entryType,m.name,m.startTime);performance.clearMarks("v16-start");})()
JavaScript Reference