UNPKG

@zendesk/retrace

Version:

define and capture Product Operation Traces along with computed metrics with an optional friendly React beacon API

130 lines (127 loc) 2.42 kB
import type { ActionWithStateMetadata } from '../types' export const id = 'test' export const mountedPlacements = ['beacon'] export const actionsFixture: ActionWithStateMetadata[] = [ { type: 'stage-change', marker: 'point', timestamp: 100, stage: 'loading', source: 'beacon', mountedPlacements, timingId: id, entry: { duration: 100, startTime: 0, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'render', source: 'beacon', marker: 'start', timestamp: 100, mountedPlacements, timingId: id, entry: { duration: 0, startTime: 0, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'render', source: 'beacon', marker: 'end', timestamp: 200, mountedPlacements, timingId: id, entry: { duration: 100, startTime: 100, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'stage-change', marker: 'point', timestamp: 200, stage: 'ready', source: 'beacon', mountedPlacements, timingId: id, entry: { duration: 100, startTime: 100, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'render', source: 'beacon', marker: 'start', timestamp: 200, mountedPlacements, timingId: id, entry: { duration: 0, startTime: 200, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'render', source: 'beacon', marker: 'end', timestamp: 300, mountedPlacements, timingId: id, entry: { duration: 100, startTime: 200, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'unresponsive', source: 'observer', marker: 'start', timestamp: 400, mountedPlacements, timingId: id, entry: { duration: 0, startTime: 300, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, { type: 'unresponsive', source: 'observer', marker: 'end', timestamp: 900, mountedPlacements, timingId: id, entry: { duration: 300, startTime: 600, entryType: 'mark', name: id, toJSON: () => ({}), }, } as const, ]