Skip to main content

Markers

Collect performance events from the measure, performance.mark and performance.measure APIs.

Usage

index.js
import { init, markers } from "@palette.dev/browser";

init({
// ...
plugins: [markers()],
});

Measures

The measure API allows measuring sub-millisecond latency of events.

measure.start() and measure.end()

Measure the duration of a task.

Example: Measure the latency of opening a modal

import { measure } from "@palette.dev/browser";

measure.start("modalOpenDuration");
openModal();
measure.end("modalOpenDuration");

Collected Events

© 2024 Redraw, Inc.