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

Usage in Deno

```typescript import { type Performance } from "node:node__perf_hooks.d.ts"; ```
Performance.markResourceTiming(
timingInfo: object,
requestedUrl: string,
initiatorType: string,
global: object,
cacheMode: "" | "local",
bodyInfo: object,
responseStatus: number,
deliveryType?: string,
): PerformanceResourceTiming
Creates a new `PerformanceResourceTiming` entry in the Resource Timeline. A `PerformanceResourceTiming` is a subclass of `PerformanceEntry` whose `performanceEntry.entryType` is always `'resource'`. Performance resources are used to mark moments in the Resource Timeline.

Parameters

timingInfo: object
[Fetch Timing Info](https://fetch.spec.whatwg.org/#fetch-timing-info)
requestedUrl: string
The resource url
initiatorType: string
The initiator name, e.g: 'fetch'
global: object
cacheMode: "" | "local"
The cache mode must be an empty string ('') or 'local'
bodyInfo: object
[Fetch Response Body Info](https://fetch.spec.whatwg.org/#response-body-info)
responseStatus: number
The response's status code
optional
deliveryType: string
The delivery type. Default: ''.

Return Type