Skip to main content
Performance.mark - node__perf_hooks.d.ts - Node documentation
method Performance.mark

Usage in Deno

```typescript import { type Performance } from "node:node__perf_hooks.d.ts"; ```
Performance.mark(
name: string,
options?: MarkOptions,
): PerformanceMark
Creates a new `PerformanceMark` entry in the Performance Timeline. A `PerformanceMark` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'mark'`, and whose `performanceEntry.duration` is always `0`. Performance marks are used to mark specific significant moments in the Performance Timeline. The created `PerformanceMark` entry is put in the global Performance Timeline and can be queried with `performance.getEntries`, `performance.getEntriesByName`, and `performance.getEntriesByType`. When the observation is performed, the entries should be cleared from the global Performance Timeline manually with `performance.clearMarks`.

Parameters

name: string
optional
options: MarkOptions

Return Type